-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trust Audit Mitigation Review Changes
Fixes from the Trust Audit mitigation review, plus some other gas savings and variable name cleanup
- Loading branch information
Showing
9 changed files
with
325 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,112 @@ | ||
CreateHatsTest:testCannotCreateHatWithZeroAddressEligibility() (gas: 25575) | ||
CreateHatsTest:testCannotCreateHatWithZeroAddressToggle() (gas: 23505) | ||
CreateHatsTest:testHatsBranchCreated() (gas: 420051) | ||
CreateHatsTest:testImmutableHatCreated() (gas: 178325) | ||
CreateHatsTest:testMutableHatCreated() (gas: 186206) | ||
CreateTopHatTest:testTopHatCreated() (gas: 186037) | ||
CreateTopHatTest:testTopHatMinted() (gas: 201950) | ||
CreateTopHatTest:testTransferTopHat() (gas: 206273) | ||
CreateHatsTest:testCannotCreateHatWithZeroAddressEligibility() (gas: 25224) | ||
CreateHatsTest:testCannotCreateHatWithZeroAddressToggle() (gas: 23142) | ||
CreateHatsTest:testHatsBranchCreated() (gas: 394582) | ||
CreateHatsTest:testImmutableHatCreated() (gas: 172167) | ||
CreateHatsTest:testMutableHatCreated() (gas: 177290) | ||
CreateTopHatTest:testTopHatCreated() (gas: 185816) | ||
CreateTopHatTest:testTopHatMinted() (gas: 198163) | ||
CreateTopHatTest:testTransferTopHat() (gas: 202057) | ||
DeployTest:testDeployWithParams() (gas: 12321) | ||
EligibilityCheckHatsTests:testCannotGetHatWearerStandingNoFunctionInEligibilityContract() (gas: 18538) | ||
EligibilityCheckHatsTests:testCheckEligibilityAndDoNotRevokeHatFromEligibleWearer() (gas: 51354) | ||
EligibilityCheckHatsTests:testCheckEligibilityToRevokeHatFromEligibleWearerInBadStanding() (gas: 71222) | ||
EligibilityCheckHatsTests:testCheckEligibilityToRevokeHatFromIneligibleWearerInBadStanding() (gas: 71191) | ||
EligibilityCheckHatsTests:testCheckEligibilityToRevokeHatFromIneligibleWearerInGoodStanding() (gas: 47104) | ||
EligibilityCheckHatsTests:testCheckWearerBackInGoodStanding() (gas: 48716) | ||
EligibilitySetHatsTests:testCannotRevokeHatAsNonWearer() (gas: 25877) | ||
EligibilitySetHatsTests:testDoNotRevokeHatFromEligibleWearerInGoodStanding() (gas: 48562) | ||
EligibilitySetHatsTests:testRemintAfterRevokeHatFromWearerInGoodStanding() (gas: 85256) | ||
EligibilitySetHatsTests:testRevokeHatFromEligibleWearerInBadStanding() (gas: 68314) | ||
EligibilitySetHatsTests:testRevokeHatFromIneligibleWearerInBadStanding() (gas: 68299) | ||
EligibilitySetHatsTests:testRevokeHatFromIneligibleWearerInGoodStanding() (gas: 46853) | ||
EligibilitySetHatsTests:testSetWearerBackInGoodStanding() (gas: 52751) | ||
HatIdUtilTests:testBuildHatId() (gas: 70396) | ||
HatIdUtilTests:testTopHatDomain() (gas: 14293) | ||
EligibilityCheckHatsTests:testCannotGetHatWearerStandingNoFunctionInEligibilityContract() (gas: 18514) | ||
EligibilityCheckHatsTests:testCheckEligibilityAndDoNotRevokeHatFromEligibleWearer() (gas: 43716) | ||
EligibilityCheckHatsTests:testCheckEligibilityToRevokeHatFromEligibleWearerInBadStanding() (gas: 65350) | ||
EligibilityCheckHatsTests:testCheckEligibilityToRevokeHatFromIneligibleWearerInBadStanding() (gas: 65319) | ||
EligibilityCheckHatsTests:testCheckEligibilityToRevokeHatFromIneligibleWearerInGoodStanding() (gas: 41243) | ||
EligibilityCheckHatsTests:testCheckWearerBackInGoodStanding() (gas: 48608) | ||
EligibilitySetHatsTests:testCannotRevokeHatAsNonWearer() (gas: 17907) | ||
EligibilitySetHatsTests:testDoNotRevokeHatFromEligibleWearerInGoodStanding() (gas: 38957) | ||
EligibilitySetHatsTests:testRemintAfterRevokeHatFromWearerInGoodStanding() (gas: 63781) | ||
EligibilitySetHatsTests:testRevokeHatFromEligibleWearerInBadStanding() (gas: 60475) | ||
EligibilitySetHatsTests:testRevokeHatFromIneligibleWearerInBadStanding() (gas: 60460) | ||
EligibilitySetHatsTests:testRevokeHatFromIneligibleWearerInGoodStanding() (gas: 39001) | ||
EligibilitySetHatsTests:testSetWearerBackInGoodStanding() (gas: 44714) | ||
HatIdUtilTests:testBuildHatId() (gas: 70408) | ||
HatIdUtilTests:testTopHatDomain() (gas: 14294) | ||
HatIdUtilTests:testgetHatLevel() (gas: 80469) | ||
ImageURITest:testEmptyHatBranchImageURI() (gas: 748738) | ||
ImageURITest:testEmptyHatImageURI() (gas: 150492) | ||
ImageURITest:testEmptyTopHatImageURI() (gas: 103779) | ||
ImageURITest:testFallbackToTopHatImageURI() (gas: 130526) | ||
ImageURITest:testEmptyHatBranchImageURI() (gas: 714178) | ||
ImageURITest:testEmptyHatImageURI() (gas: 146545) | ||
ImageURITest:testEmptyTopHatImageURI() (gas: 103686) | ||
ImageURITest:testFallbackToTopHatImageURI() (gas: 126241) | ||
ImageURITest:testHatImageURI() (gas: 14705) | ||
ImageURITest:testTopHatImageURI() (gas: 14705) | ||
LinkHatsTests:testAdminCanApproveLinkRequest() (gas: 132103) | ||
LinkHatsTests:testAdminCanApproveLinkToLastLevelHat() (gas: 309790) | ||
LinkHatsTests:testAdminCanRelinkTopHatWithinTree() (gas: 149007) | ||
LinkHatsTests:testAdminCanRequestNewLink() (gas: 148376) | ||
LinkHatsTests:testCannotApproveCrossTreeLink() (gas: 264542) | ||
LinkHatsTests:testCannotApproveUnrequestedLink() (gas: 62171) | ||
LinkHatsTests:testCannotCrossTreeRelink() (gas: 242170) | ||
LinkHatsTests:testLinkedTopHatWearerCannotRequestNewLink() (gas: 146261) | ||
LinkHatsTests:testNewAdminAdminCanApproveNewLinkRequest() (gas: 142781) | ||
LinkHatsTests:testNewAdminAdminCanRelinkToLastLevelWithinTree() (gas: 354455) | ||
LinkHatsTests:testNewAdminNonAdminCannotRelinkToLastLevelWithinTree() (gas: 300719) | ||
LinkHatsTests:testNewAdminNonAdminNonWearerCannotRelink() (gas: 142967) | ||
LinkHatsTests:testNewAdminWearerCanRelinkTopHatWithinTree() (gas: 239662) | ||
LinkHatsTests:testNonAdminNonWearerCannotApproveLinktoLastLevelHat() (gas: 388464) | ||
LinkHatsTests:testPreventingCircularLinking() (gas: 167152) | ||
LinkHatsTests:testRelinkingCannotCreateCircularLink() (gas: 333767) | ||
LinkHatsTests:testRequestLinking() (gas: 63010) | ||
LinkHatsTests:testTreeLinkingAndUnlinking() (gas: 162573) | ||
LinkHatsTests:testTreeRootNonAdminCannotRelink() (gas: 213478) | ||
LinkHatsTests:testWearerCanApproveLinkRequest() (gas: 105958) | ||
LinkHatsTests:testWearerCanApproveLinkToLastLevelHat() (gas: 348652) | ||
LinkedTreeHatIdUtilTests:testLinkedHats() (gas: 85148) | ||
MalformedInputsTests:testCatchMalformedEligibilityData_checkHatWearerStatus() (gas: 33504) | ||
MalformedInputsTests:testCatchMalformedEligibilityData_isEligible() (gas: 43196) | ||
MalformedInputsTests:testCatchMalformedEligibilityData_isInGoodStanding() (gas: 31327) | ||
MalformedInputsTests:testCatchMalformedToggleData_checkHatStatus() (gas: 53422) | ||
MalformedInputsTests:testCatchMalformedToggleData_isWearerOfHat() (gas: 50197) | ||
MintHatsTest:testCannotMint2HatsToSameWearer() (gas: 141441) | ||
MintHatsTest:testCannotMintHatToIneligibleWearer() (gas: 32560) | ||
MintHatsTest:testCannotMintMoreThanMaxSupplyErrorAllHatsWorn() (gas: 196158) | ||
MintHatsTest:testCannotMintNonExistentHat() (gas: 23426) | ||
MintHatsTest:testMintAnotherHat() (gas: 163275) | ||
MintHatsTest:testMintHat() (gas: 107728) | ||
MintHatsTest:testMintHatErrorNotAdmin() (gas: 73803) | ||
MintHatsTest:testMintInactiveHat() (gas: 100176) | ||
MutabilityTests:testAdminCanChangeMutableHatDetails() (gas: 64296) | ||
MutabilityTests:testAdminCanChangeMutableHatEligibility() (gas: 60996) | ||
MutabilityTests:testAdminCanChangeMutableHatImageURI() (gas: 64282) | ||
MutabilityTests:testAdminCanChangeMutableHatToggle() (gas: 58700) | ||
MutabilityTests:testAdminCanDecreaseMutableHatMaxSupplyToAboveCurrentSupply() (gas: 115589) | ||
MutabilityTests:testAdminCanDecreaseMutableHatMaxSupplyToEqualToCurrentSupply() (gas: 115578) | ||
MutabilityTests:testAdminCanIncreaseMutableHatMaxSupply() (gas: 61272) | ||
MutabilityTests:testAdminCanMakeMutableHatImmutable() (gas: 70261) | ||
MutabilityTests:testAdminCannotChangeEligibilityToZeroAddress() (gas: 13175) | ||
MutabilityTests:testAdminCannotChangeImutableHatProperties() (gas: 222952) | ||
MutabilityTests:testAdminCannotChangeToggleToZeroAddress() (gas: 13111) | ||
MutabilityTests:testAdminCannotDecreaseMutableHatMaxSupplyBelowCurrentSupply() (gas: 144148) | ||
MutabilityTests:testAdminCannotTransferImmutableHat() (gas: 230747) | ||
MutabilityTests:testCannotChangeImmutableHatMutability() (gas: 184831) | ||
MutabilityTests:testNonAdminCannotMakeMutableHatImmutable() (gas: 33093) | ||
MutabilityTests:testNonTopHatCannotChangeTopHatProperties() (gas: 59694) | ||
MutabilityTests:testTopHatCanChangeOwnDetails() (gas: 51575) | ||
MutabilityTests:testTopHatCanChangeOwnImageURI() (gas: 51564) | ||
MutabilityTests:testTopHatCannotChangeOtherProperties() (gas: 76832) | ||
OverridesHatTests:testCreateUri() (gas: 102026) | ||
OverridesHatTests:testCreateUriForTopHat() (gas: 100884) | ||
OverridesHatTests:testFailSafeTransferFrom() (gas: 12611) | ||
OverridesHatTests:testFailSetApprovalForAll() (gas: 7688) | ||
RenounceHatsTest:testCanRenounceHatAsNonWearerWithStaticBalance() (gas: 117574) | ||
LinkHatsTests:testAdminCanApproveLinkRequest() (gas: 112712) | ||
LinkHatsTests:testAdminCanApproveLinkToLastLevelHat() (gas: 171863) | ||
LinkHatsTests:testAdminCanRelinkTopHatWithinTree() (gas: 123569) | ||
LinkHatsTests:testAdminCanRequestNewLink() (gas: 129040) | ||
LinkHatsTests:testCannotApproveCrossTreeLink() (gas: 240993) | ||
LinkHatsTests:testCannotApproveUnrequestedLink() (gas: 50291) | ||
LinkHatsTests:testCannotCrossTreeRelink() (gas: 226484) | ||
LinkHatsTests:testLinkedTopHatWearerCannotRequestNewLink() (gas: 123273) | ||
LinkHatsTests:testNewAdminAdminCanApproveNewLinkRequest() (gas: 124644) | ||
LinkHatsTests:testNewAdminAdminCanRelinkToLastLevelWithinTree() (gas: 202962) | ||
LinkHatsTests:testNewAdminNonAdminCannotRelinkToLastLevelWithinTree() (gas: 174745) | ||
LinkHatsTests:testNewAdminNonAdminNonWearerCannotRelink() (gas: 119989) | ||
LinkHatsTests:testNewAdminWearerCanRelinkTopHatWithinTree() (gas: 215298) | ||
LinkHatsTests:testNonAdminNonWearerCannotApproveLinktoLastLevelHat() (gas: 226266) | ||
LinkHatsTests:testPreventingCircularLinking() (gas: 146203) | ||
LinkHatsTests:testRelinkingCannotCreateCircularLink() (gas: 306775) | ||
LinkHatsTests:testRequestLinking() (gas: 57282) | ||
LinkHatsTests:testTreeLinkingAndUnlinking() (gas: 133314) | ||
LinkHatsTests:testTreeRootNonAdminCannotRelink() (gas: 188634) | ||
LinkHatsTests:testWearerCanApproveLinkRequest() (gas: 92677) | ||
LinkHatsTests:testWearerCanApproveLinkToLastLevelHat() (gas: 207633) | ||
LinkedTreeHatIdUtilTests:testLinkedHats() (gas: 85157) | ||
MalformedInputsTests:testCatchMalformedEligibilityData_checkHatWearerStatus() (gas: 33432) | ||
MalformedInputsTests:testCatchMalformedEligibilityData_isEligible() (gas: 31259) | ||
MalformedInputsTests:testCatchMalformedEligibilityData_isInGoodStanding() (gas: 31219) | ||
MalformedInputsTests:testCatchMalformedToggleData_checkHatStatus() (gas: 29565) | ||
MalformedInputsTests:testCatchMalformedToggleData_isWearerOfHat() (gas: 40847) | ||
MintHatsTest:testCannotMint2HatsToSameWearer() (gas: 117044) | ||
MintHatsTest:testCannotMintHatToIneligibleWearer() (gas: 22703) | ||
MintHatsTest:testCannotMintMoreThanMaxSupplyErrorAllHatsWorn() (gas: 152429) | ||
MintHatsTest:testCannotMintNonExistentHat() (gas: 15849) | ||
MintHatsTest:testMintAnotherHat() (gas: 138872) | ||
MintHatsTest:testMintHat() (gas: 86467) | ||
MintHatsTest:testMintHatErrorNotAdmin() (gas: 56604) | ||
MintHatsTest:testMintInactiveHat() (gas: 80475) | ||
MutabilityTests:testAdminCanChangeMutableHatDetails() (gas: 53398) | ||
MutabilityTests:testAdminCanChangeMutableHatEligibility() (gas: 50329) | ||
MutabilityTests:testAdminCanChangeMutableHatImageURI() (gas: 53362) | ||
MutabilityTests:testAdminCanChangeMutableHatToggle() (gas: 48033) | ||
MutabilityTests:testAdminCanDecreaseMutableHatMaxSupplyToAboveCurrentSupply() (gas: 95036) | ||
MutabilityTests:testAdminCanDecreaseMutableHatMaxSupplyToEqualToCurrentSupply() (gas: 95025) | ||
MutabilityTests:testAdminCanIncreaseMutableHatMaxSupply() (gas: 50635) | ||
MutabilityTests:testAdminCanMakeMutableHatImmutable() (gas: 59000) | ||
MutabilityTests:testAdminCannotChangeEligibilityToZeroAddress() (gas: 13151) | ||
MutabilityTests:testAdminCannotChangeImutableHatProperties() (gas: 193575) | ||
MutabilityTests:testAdminCannotChangeToggleToZeroAddress() (gas: 13087) | ||
MutabilityTests:testAdminCannotDecreaseMutableHatMaxSupplyBelowCurrentSupply() (gas: 114319) | ||
MutabilityTests:testAdminCannotTransferImmutableHat() (gas: 211829) | ||
MutabilityTests:testCannotChangeImmutableHatMutability() (gas: 171852) | ||
MutabilityTests:testNonAdminCannotMakeMutableHatImmutable() (gas: 27343) | ||
MutabilityTests:testNonTopHatCannotChangeTopHatProperties() (gas: 47788) | ||
MutabilityTests:testTopHatCanChangeOwnDetails() (gas: 48899) | ||
MutabilityTests:testTopHatCanChangeOwnImageURI() (gas: 48866) | ||
MutabilityTests:testTopHatCannotChangeOtherProperties() (gas: 65156) | ||
OverridesHatTests:testCreateUri() (gas: 100941) | ||
OverridesHatTests:testCreateUriForTopHat() (gas: 99798) | ||
OverridesHatTests:testFailSafeTransferFrom() (gas: 12587) | ||
OverridesHatTests:testFailSetApprovalForAll() (gas: 7676) | ||
RenounceHatsTest:testCanRenounceHatAsNonWearerWithStaticBalance() (gas: 81805) | ||
RenounceHatsTest:testCannotRenounceHatAsNonWearerWithNoStaticBalance() (gas: 15488) | ||
RenounceHatsTest:testRenounceHat() (gas: 39309) | ||
ToggleCheckHatsTest:testCannotCheckHatStatusNoFunctionInToggleContract() (gas: 24177) | ||
ToggleCheckHatsTest:testCannotCheckToggleOffToArbitrarilyIncrementHatSupply() (gas: 113016) | ||
ToggleCheckHatsTest:testCheckToggleToActivateDeactivatedHat() (gas: 80197) | ||
ToggleCheckHatsTest:testCheckToggleToDeactivateHat() (gas: 49529) | ||
ToggleSetHatsTest:testActivateDeactivatedHat() (gas: 76051) | ||
ToggleSetHatsTest:testCannotActivateDeactivatedHatAsNonWearer() (gas: 32112) | ||
ToggleSetHatsTest:testCannotDeactivateHatAsNonWearer() (gas: 15665) | ||
ToggleSetHatsTest:testCannotSetToggleOffToArbitrarilyIncrementHatSupply() (gas: 113098) | ||
ToggleSetHatsTest:testDeactivateHat() (gas: 87616) | ||
TransferHatTests:testCannotTransferHatFromNonAdmin() (gas: 40016) | ||
TransferHatTests:testCannotTransferHatToExistingWearer() (gas: 97533) | ||
TransferHatTests:testCannotTransferHatToIneligibleWearer() (gas: 61213) | ||
TransferHatTests:testCannotTransferHatToRevokedWearer() (gas: 109231) | ||
TransferHatTests:testTransferMutableHat() (gas: 105515) | ||
RenounceHatsTest:testRenounceHat() (gas: 33508) | ||
ToggleCheckHatsTest:testCannotCheckHatStatusNoFunctionInToggleContract() (gas: 16215) | ||
ToggleCheckHatsTest:testCannotCheckToggleOffToArbitrarilyIncrementHatSupply() (gas: 92490) | ||
ToggleCheckHatsTest:testCheckToggleToActivateDeactivatedHat() (gas: 71736) | ||
ToggleCheckHatsTest:testCheckToggleToDeactivateHat() (gas: 42954) | ||
ToggleSetHatsTest:testActivateDeactivatedHat() (gas: 69755) | ||
ToggleSetHatsTest:testCannotActivateDeactivatedHatAsNonWearer() (gas: 24154) | ||
ToggleSetHatsTest:testCannotDeactivateHatAsNonWearer() (gas: 15653) | ||
ToggleSetHatsTest:testCannotSetToggleOffToArbitrarilyIncrementHatSupply() (gas: 96908) | ||
ToggleSetHatsTest:testDeactivateHat() (gas: 80802) | ||
TransferHatTests:testCannotTransferHatFromNonAdmin() (gas: 34242) | ||
TransferHatTests:testCannotTransferHatToExistingWearer() (gas: 77548) | ||
TransferHatTests:testCannotTransferHatToIneligibleWearer() (gas: 45202) | ||
TransferHatTests:testCannotTransferHatToRevokedWearer() (gas: 87487) | ||
TransferHatTests:testTransferMutableHat() (gas: 85612) | ||
ViewHatTests:testGetHatLevel() (gas: 13740) | ||
ViewHatTests:testIsAdminOfHat() (gas: 31758) | ||
ViewHatTests:testViewHat1() (gas: 96260) | ||
ViewHatTests:testViewHat2() (gas: 71263) | ||
ViewHatTests:testViewHatOfTopHat1() (gas: 72245) | ||
ViewHatTests:testViewHatOfTopHat2() (gas: 71241) | ||
ViewHatTests:testIsAdminOfHat() (gas: 23637) | ||
ViewHatTests:testViewHat1() (gas: 95639) | ||
ViewHatTests:testViewHat2() (gas: 70642) | ||
ViewHatTests:testViewHatOfTopHat1() (gas: 71624) | ||
ViewHatTests:testViewHatOfTopHat2() (gas: 70620) |
Oops, something went wrong.