From 9c4f2605a0e9c7f2164444826ee27af1eab4c21d Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Wed, 20 Mar 2024 11:44:18 +0100 Subject: [PATCH 1/8] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Make=20`AccessContr?= =?UTF-8?q?ol`=20Modules-Ready?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- src/snekmate/auth/AccessControl.vy | 18 ------ src/snekmate/auth/mocks/AccessControlMock.vy | 63 ++++++++++++++++++++ test/auth/AccessControl.t.sol | 4 +- 3 files changed, 65 insertions(+), 20 deletions(-) create mode 100644 src/snekmate/auth/mocks/AccessControlMock.vy diff --git a/src/snekmate/auth/AccessControl.vy b/src/snekmate/auth/AccessControl.vy index b6fdb0c3..57b984f3 100644 --- a/src/snekmate/auth/AccessControl.vy +++ b/src/snekmate/auth/AccessControl.vy @@ -69,22 +69,6 @@ implements: IAccessControl DEFAULT_ADMIN_ROLE: public(constant(bytes32)) = empty(bytes32) -# @dev An additional 32-byte access role. -# @notice Please adjust the naming of the variable -# according to your specific requirement, -# e.g. `MINTER_ROLE`. -ADDITIONAL_ROLE_1: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_1") - - -# @dev An additional 32-byte access role. -# @notice Please adjust the naming of the variable -# according to your specific requirement, -# e.g. `PAUSER_ROLE`. Also, feel free to add more -# roles if necessary. In this case, it is important -# to extend the constructor accordingly. -ADDITIONAL_ROLE_2: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_2") - - # @dev Stores the ERC-165 interface identifier for each # imported interface. The ERC-165 interface identifier # is defined as the XOR of all function selectors in the @@ -147,8 +131,6 @@ def __init__(): the `msg.sender`. """ self._grant_role(DEFAULT_ADMIN_ROLE, msg.sender) - self._grant_role(ADDITIONAL_ROLE_1, msg.sender) - self._grant_role(ADDITIONAL_ROLE_2, msg.sender) @external diff --git a/src/snekmate/auth/mocks/AccessControlMock.vy b/src/snekmate/auth/mocks/AccessControlMock.vy new file mode 100644 index 00000000..53a97660 --- /dev/null +++ b/src/snekmate/auth/mocks/AccessControlMock.vy @@ -0,0 +1,63 @@ +# pragma version ~=0.4.0b5 +""" +@title Wrapper Contract for Multi-Role-Based Access Control Functions +@custom:contract-name AccessControlMock +@license GNU Affero General Public License v3.0 only +@author pcaversaccio +""" + + +# @dev We import and initialise the `AccessControl` module. +from .. import AccessControl as ac +initializes: ac + + +# @dev We import and implement the `IERC165` interface, +# which is a built-in interface of the Vyper compiler. +from ethereum.ercs import IERC165 +implements: IERC165 + + +# @dev We import and implement the `IAccessControl` +# interface, which is written using standard Vyper +# syntax. +from ..interfaces import IAccessControl +implements: IAccessControl + + +# @dev An additional 32-byte access role. +ADDITIONAL_ROLE_1: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_1") + + +# @dev An additional 32-byte access role. +ADDITIONAL_ROLE_2: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_2") + + +# @dev We export all public functions from the `AccessControl` module. +# @notice It's important to also export public `immutable` and state +# variables. +exports: ( + ac.supportsInterface, + ac.DEFAULT_ADMIN_ROLE, + ac.hasRole, + ac.getRoleAdmin, + ac.grantRole, + ac.revokeRole, + ac.renounceRole, + ac.set_role_admin +) + + +@deploy +@payable +def __init__(): + """ + @dev To omit the opcodes for checking the `msg.value` + in the creation-time EVM bytecode, the constructor + is declared as `payable`. + @notice All predefined roles will be assigned to + the `msg.sender`. + """ + ac.__init__() # Assigns the `DEFAULT_ADMIN_ROLE` to the `msg.sender`. + ac._grant_role(ADDITIONAL_ROLE_1, msg.sender) + ac._grant_role(ADDITIONAL_ROLE_2, msg.sender) diff --git a/test/auth/AccessControl.t.sol b/test/auth/AccessControl.t.sol index 30a391af..739fc912 100644 --- a/test/auth/AccessControl.t.sol +++ b/test/auth/AccessControl.t.sol @@ -23,7 +23,7 @@ contract AccessControlTest is Test { function setUp() public { accessControl = IAccessControlExtended( - vyperDeployer.deployContract("src/snekmate/auth/", "AccessControl") + vyperDeployer.deployContract("src/snekmate/auth/mocks/", "AccessControlMock") ); } @@ -54,7 +54,7 @@ contract AccessControlTest is Test { vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_2, deployer, deployer); accessControlInitialEvent = IAccessControlExtended( - vyperDeployer.deployContract("src/snekmate/auth/", "AccessControl") + vyperDeployer.deployContract("src/snekmate/auth/mocks/", "AccessControlMock") ); assertEq( accessControlInitialEvent.DEFAULT_ADMIN_ROLE(), From 23aabc28afd53e877486e219a449111692fbfacb Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Wed, 20 Mar 2024 12:00:02 +0100 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=92=84=20Prettify?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- test/auth/AccessControl.t.sol | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/auth/AccessControl.t.sol b/test/auth/AccessControl.t.sol index 739fc912..f121ac6b 100644 --- a/test/auth/AccessControl.t.sol +++ b/test/auth/AccessControl.t.sol @@ -23,7 +23,10 @@ contract AccessControlTest is Test { function setUp() public { accessControl = IAccessControlExtended( - vyperDeployer.deployContract("src/snekmate/auth/mocks/", "AccessControlMock") + vyperDeployer.deployContract( + "src/snekmate/auth/mocks/", + "AccessControlMock" + ) ); } @@ -54,7 +57,10 @@ contract AccessControlTest is Test { vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_2, deployer, deployer); accessControlInitialEvent = IAccessControlExtended( - vyperDeployer.deployContract("src/snekmate/auth/mocks/", "AccessControlMock") + vyperDeployer.deployContract( + "src/snekmate/auth/mocks/", + "AccessControlMock" + ) ); assertEq( accessControlInitialEvent.DEFAULT_ADMIN_ROLE(), From b6a414ea26ff9f4c0254936f7a93958a1259caf6 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Wed, 20 Mar 2024 16:52:29 +0100 Subject: [PATCH 3/8] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Amend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- .gas-snapshot | 948 +++++++++---------- CHANGELOG.md | 5 + GUIDELINES.md | 6 +- README.md | 2 +- src/snekmate/auth/mocks/AccessControlMock.vy | 29 +- test/auth/AccessControl.t.sol | 9 +- 6 files changed, 508 insertions(+), 491 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index ba09386d..476095f4 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,34 +1,34 @@ -AccessControlInvariants:invariantGetRoleAdmin() (runs: 256, calls: 3840, reverts: 3840) -AccessControlInvariants:invariantHasRole() (runs: 256, calls: 3840, reverts: 3840) -AccessControlTest:testFuzzGrantRoleAdminRoleSuccess(address) (runs: 256, μ: 44090, ~: 44090) -AccessControlTest:testFuzzGrantRoleMultipleTimesSuccess(address) (runs: 256, μ: 50007, ~: 50007) -AccessControlTest:testFuzzGrantRoleNonAdmin(address,address) (runs: 256, μ: 16544, ~: 16544) -AccessControlTest:testFuzzGrantRoleSuccess(address) (runs: 256, μ: 44156, ~: 44156) -AccessControlTest:testFuzzRenounceRoleMultipleTimesSuccess(address) (runs: 256, μ: 46094, ~: 46079) +AccessControlInvariants:statefulFuzzGetRoleAdmin() (runs: 256, calls: 3840, reverts: 3840) +AccessControlInvariants:statefulFuzzHasRole() (runs: 256, calls: 3840, reverts: 3840) +AccessControlTest:testFuzzGrantRoleAdminRoleSuccess(address) (runs: 256, μ: 44071, ~: 44071) +AccessControlTest:testFuzzGrantRoleMultipleTimesSuccess(address) (runs: 256, μ: 49948, ~: 49948) +AccessControlTest:testFuzzGrantRoleNonAdmin(address,address) (runs: 256, μ: 16545, ~: 16545) +AccessControlTest:testFuzzGrantRoleSuccess(address) (runs: 256, μ: 44137, ~: 44137) +AccessControlTest:testFuzzRenounceRoleMultipleTimesSuccess(address) (runs: 256, μ: 45995, ~: 45980) AccessControlTest:testFuzzRenounceRoleNonMsgSender(address) (runs: 256, μ: 9556, ~: 9556) -AccessControlTest:testFuzzRenounceRoleSuccess(address) (runs: 256, μ: 42015, ~: 42000) -AccessControlTest:testFuzzRevokeRoleMultipleTimesSuccess(address) (runs: 256, μ: 41785, ~: 41769) -AccessControlTest:testFuzzRevokeRoleNonAdmin(address,address) (runs: 256, μ: 16498, ~: 16498) -AccessControlTest:testFuzzRevokeRoleSuccess(address) (runs: 256, μ: 40629, ~: 40613) -AccessControlTest:testFuzzSetRoleAdminPreviousAdminCallsGrantRole(address,address) (runs: 256, μ: 76106, ~: 76106) -AccessControlTest:testFuzzSetRoleAdminPreviousAdminCallsRevokeRole(address,address) (runs: 256, μ: 101635, ~: 101635) -AccessControlTest:testFuzzSetRoleAdminSuccess(address,address) (runs: 256, μ: 91093, ~: 91093) -AccessControlTest:testGrantRoleAdminRoleSuccess() (gas: 45064) -AccessControlTest:testGrantRoleMultipleTimesSuccess() (gas: 51025) -AccessControlTest:testGrantRoleNonAdmin() (gas: 14998) -AccessControlTest:testGrantRoleSuccess() (gas: 45283) -AccessControlTest:testInitialSetup() (gas: 474709) -AccessControlTest:testRenounceRoleAdminRoleSuccess() (gas: 21004) -AccessControlTest:testRenounceRoleMultipleTimesSuccess() (gas: 46929) +AccessControlTest:testFuzzRenounceRoleSuccess(address) (runs: 256, μ: 41949, ~: 41934) +AccessControlTest:testFuzzRevokeRoleMultipleTimesSuccess(address) (runs: 256, μ: 41722, ~: 41707) +AccessControlTest:testFuzzRevokeRoleNonAdmin(address,address) (runs: 256, μ: 16499, ~: 16499) +AccessControlTest:testFuzzRevokeRoleSuccess(address) (runs: 256, μ: 40564, ~: 40549) +AccessControlTest:testFuzzSetRoleAdminPreviousAdminCallsGrantRole(address,address) (runs: 256, μ: 76066, ~: 76066) +AccessControlTest:testFuzzSetRoleAdminPreviousAdminCallsRevokeRole(address,address) (runs: 256, μ: 101598, ~: 101598) +AccessControlTest:testFuzzSetRoleAdminSuccess(address,address) (runs: 256, μ: 91014, ~: 91014) +AccessControlTest:testGrantRoleAdminRoleSuccess() (gas: 45045) +AccessControlTest:testGrantRoleMultipleTimesSuccess() (gas: 50966) +AccessControlTest:testGrantRoleNonAdmin() (gas: 14999) +AccessControlTest:testGrantRoleSuccess() (gas: 45264) +AccessControlTest:testInitialSetup() (gas: 471093) +AccessControlTest:testRenounceRoleAdminRoleSuccess() (gas: 20941) +AccessControlTest:testRenounceRoleMultipleTimesSuccess() (gas: 46830) AccessControlTest:testRenounceRoleNonMsgSender() (gas: 10644) -AccessControlTest:testRenounceRoleSuccess() (gas: 42922) -AccessControlTest:testRevokeRoleAdminRoleSuccess() (gas: 25016) -AccessControlTest:testRevokeRoleMultipleTimesSuccess() (gas: 42656) -AccessControlTest:testRevokeRoleNonAdmin() (gas: 15086) -AccessControlTest:testRevokeRoleSuccess() (gas: 41500) -AccessControlTest:testSetRoleAdminPreviousAdminCallsGrantRole() (gas: 78703) -AccessControlTest:testSetRoleAdminPreviousAdminCallsRevokeRole() (gas: 104164) -AccessControlTest:testSetRoleAdminSuccess() (gas: 93519) +AccessControlTest:testRenounceRoleSuccess() (gas: 42856) +AccessControlTest:testRevokeRoleAdminRoleSuccess() (gas: 24976) +AccessControlTest:testRevokeRoleMultipleTimesSuccess() (gas: 42593) +AccessControlTest:testRevokeRoleNonAdmin() (gas: 15087) +AccessControlTest:testRevokeRoleSuccess() (gas: 41436) +AccessControlTest:testSetRoleAdminPreviousAdminCallsGrantRole() (gas: 78663) +AccessControlTest:testSetRoleAdminPreviousAdminCallsRevokeRole() (gas: 104127) +AccessControlTest:testSetRoleAdminSuccess() (gas: 93440) AccessControlTest:testSupportsInterfaceInvalidInterfaceId() (gas: 8378) AccessControlTest:testSupportsInterfaceInvalidInterfaceIdGasCost() (gas: 9211) AccessControlTest:testSupportsInterfaceSuccess() (gas: 9527) @@ -60,62 +60,62 @@ BatchDistributorTest:testDistributeTokenMultipleAddressesSuccess() (gas: 617661) BatchDistributorTest:testDistributeTokenOneAddressSuccess() (gas: 579248) BatchDistributorTest:testDistributeTokenRevertWithInsufficientAllowance() (gas: 574620) BatchDistributorTest:testDistributeTokenRevertWithInsufficientBalance() (gas: 575406) -BatchDistributorTest:testFuzzDistributeEtherMultipleAddressesSuccess(((address,uint256)[]),uint256) (runs: 256, μ: 1855235, ~: 1871491) -BatchDistributorTest:testFuzzDistributeTokenMultipleAddressesSuccess(((address,uint256)[]),address,uint256) (runs: 256, μ: 1347764, ~: 1322615) -Create2AddressTest:testComputeAddress() (gas: 550584) -Create2AddressTest:testComputeAddressSelf() (gas: 559224) -Create2AddressTest:testFuzzComputeAddress(bytes32,address) (runs: 256, μ: 551179, ~: 551179) -Create2AddressTest:testFuzzComputeAddressSelf(bytes32) (runs: 256, μ: 559245, ~: 559245) -CreateAddressTest:testComputeAddressNonce0x00() (gas: 16530) -CreateAddressTest:testComputeAddressNonce0x7f() (gas: 535247) -CreateAddressTest:testComputeAddressNonceUint16() (gas: 535299) -CreateAddressTest:testComputeAddressNonceUint24() (gas: 535394) -CreateAddressTest:testComputeAddressNonceUint32() (gas: 535356) -CreateAddressTest:testComputeAddressNonceUint40() (gas: 535428) -CreateAddressTest:testComputeAddressNonceUint48() (gas: 535456) -CreateAddressTest:testComputeAddressNonceUint56() (gas: 535484) -CreateAddressTest:testComputeAddressNonceUint64() (gas: 535621) -CreateAddressTest:testComputeAddressNonceUint8() (gas: 535339) -CreateAddressTest:testComputeAddressRevertTooHighNonce() (gas: 10613) -CreateAddressTest:testComputeAddressSelfNonce0x7f() (gas: 539479) -CreateAddressTest:testComputeAddressSelfNonceUint16() (gas: 539700) -CreateAddressTest:testComputeAddressSelfNonceUint24() (gas: 539729) -CreateAddressTest:testComputeAddressSelfNonceUint32() (gas: 539825) -CreateAddressTest:testComputeAddressSelfNonceUint40() (gas: 539854) -CreateAddressTest:testComputeAddressSelfNonceUint48() (gas: 539882) -CreateAddressTest:testComputeAddressSelfNonceUint56() (gas: 539911) -CreateAddressTest:testComputeAddressSelfNonceUint64() (gas: 540028) -CreateAddressTest:testComputeAddressSelfNonceUint8() (gas: 539634) +BatchDistributorTest:testFuzzDistributeEtherMultipleAddressesSuccess(((address,uint256)[]),uint256) (runs: 256, μ: 1853400, ~: 1848050) +BatchDistributorTest:testFuzzDistributeTokenMultipleAddressesSuccess(((address,uint256)[]),address,uint256) (runs: 256, μ: 1347807, ~: 1342138) +Create2AddressTest:testComputeAddress() (gas: 550587) +Create2AddressTest:testComputeAddressSelf() (gas: 559227) +Create2AddressTest:testFuzzComputeAddress(bytes32,address) (runs: 256, μ: 551182, ~: 551182) +Create2AddressTest:testFuzzComputeAddressSelf(bytes32) (runs: 256, μ: 559248, ~: 559248) +CreateAddressTest:testComputeAddressNonce0x00() (gas: 16533) +CreateAddressTest:testComputeAddressNonce0x7f() (gas: 535250) +CreateAddressTest:testComputeAddressNonceUint16() (gas: 535302) +CreateAddressTest:testComputeAddressNonceUint24() (gas: 535397) +CreateAddressTest:testComputeAddressNonceUint32() (gas: 535359) +CreateAddressTest:testComputeAddressNonceUint40() (gas: 535431) +CreateAddressTest:testComputeAddressNonceUint48() (gas: 535459) +CreateAddressTest:testComputeAddressNonceUint56() (gas: 535487) +CreateAddressTest:testComputeAddressNonceUint64() (gas: 535624) +CreateAddressTest:testComputeAddressNonceUint8() (gas: 535342) +CreateAddressTest:testComputeAddressRevertTooHighNonce() (gas: 10616) +CreateAddressTest:testComputeAddressSelfNonce0x7f() (gas: 539482) +CreateAddressTest:testComputeAddressSelfNonceUint16() (gas: 539703) +CreateAddressTest:testComputeAddressSelfNonceUint24() (gas: 539732) +CreateAddressTest:testComputeAddressSelfNonceUint32() (gas: 539828) +CreateAddressTest:testComputeAddressSelfNonceUint40() (gas: 539857) +CreateAddressTest:testComputeAddressSelfNonceUint48() (gas: 539885) +CreateAddressTest:testComputeAddressSelfNonceUint56() (gas: 539914) +CreateAddressTest:testComputeAddressSelfNonceUint64() (gas: 540031) +CreateAddressTest:testComputeAddressSelfNonceUint8() (gas: 539637) CreateAddressTest:testComputeAddressSelfRevertTooHighNonce() (gas: 8836) -CreateAddressTest:testFuzzComputeAddressNonce0x7f(uint64,address) (runs: 256, μ: 538292, ~: 538387) -CreateAddressTest:testFuzzComputeAddressNonceUint16(uint64,address) (runs: 256, μ: 537728, ~: 538001) -CreateAddressTest:testFuzzComputeAddressNonceUint24(uint64,address) (runs: 256, μ: 537855, ~: 537978) -CreateAddressTest:testFuzzComputeAddressNonceUint32(uint64,address) (runs: 256, μ: 537880, ~: 537985) -CreateAddressTest:testFuzzComputeAddressNonceUint40(uint64,address) (runs: 256, μ: 537979, ~: 538077) -CreateAddressTest:testFuzzComputeAddressNonceUint48(uint64,address) (runs: 256, μ: 537963, ~: 538061) -CreateAddressTest:testFuzzComputeAddressNonceUint56(uint64,address) (runs: 256, μ: 538002, ~: 538090) -CreateAddressTest:testFuzzComputeAddressNonceUint64(uint64,address) (runs: 256, μ: 538003, ~: 538194) -CreateAddressTest:testFuzzComputeAddressNonceUint8(uint64,address) (runs: 256, μ: 537783, ~: 537852) -CreateAddressTest:testFuzzComputeAddressRevertTooHighNonce(uint256,address) (runs: 256, μ: 12913, ~: 12845) -CreateAddressTest:testFuzzComputeAddressSelfNonce0x7f(uint64) (runs: 256, μ: 544467, ~: 544576) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint16(uint64) (runs: 256, μ: 543688, ~: 543612) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint24(uint64) (runs: 256, μ: 543970, ~: 544066) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint32(uint64) (runs: 256, μ: 544056, ~: 544162) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint40(uint64) (runs: 256, μ: 544065, ~: 544146) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint48(uint64) (runs: 256, μ: 544109, ~: 544220) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint56(uint64) (runs: 256, μ: 544199, ~: 544290) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint64(uint64) (runs: 256, μ: 544238, ~: 544420) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint8(uint64) (runs: 256, μ: 543770, ~: 543857) -CreateAddressTest:testFuzzComputeAddressSelfRevertTooHighNonce(uint256) (runs: 256, μ: 12723, ~: 12684) -ECDSATest:testEthSignedMessageHash() (gas: 8732) -ECDSATest:testFuzzEthSignedMessageHash(string) (runs: 256, μ: 9318, ~: 9312) +CreateAddressTest:testFuzzComputeAddressNonce0x7f(uint64,address) (runs: 256, μ: 538283, ~: 538390) +CreateAddressTest:testFuzzComputeAddressNonceUint16(uint64,address) (runs: 256, μ: 537715, ~: 537855) +CreateAddressTest:testFuzzComputeAddressNonceUint24(uint64,address) (runs: 256, μ: 537858, ~: 537981) +CreateAddressTest:testFuzzComputeAddressNonceUint32(uint64,address) (runs: 256, μ: 537885, ~: 537988) +CreateAddressTest:testFuzzComputeAddressNonceUint40(uint64,address) (runs: 256, μ: 537985, ~: 538080) +CreateAddressTest:testFuzzComputeAddressNonceUint48(uint64,address) (runs: 256, μ: 537969, ~: 538064) +CreateAddressTest:testFuzzComputeAddressNonceUint56(uint64,address) (runs: 256, μ: 538008, ~: 538093) +CreateAddressTest:testFuzzComputeAddressNonceUint64(uint64,address) (runs: 256, μ: 538004, ~: 538197) +CreateAddressTest:testFuzzComputeAddressNonceUint8(uint64,address) (runs: 256, μ: 537775, ~: 537855) +CreateAddressTest:testFuzzComputeAddressRevertTooHighNonce(uint256,address) (runs: 256, μ: 12906, ~: 12848) +CreateAddressTest:testFuzzComputeAddressSelfNonce0x7f(uint64) (runs: 256, μ: 544451, ~: 544579) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint16(uint64) (runs: 256, μ: 543713, ~: 543868) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint24(uint64) (runs: 256, μ: 543971, ~: 544069) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint32(uint64) (runs: 256, μ: 544071, ~: 544165) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint40(uint64) (runs: 256, μ: 544061, ~: 544149) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint48(uint64) (runs: 256, μ: 544111, ~: 544223) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint56(uint64) (runs: 256, μ: 544204, ~: 544293) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint64(uint64) (runs: 256, μ: 544264, ~: 544423) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint8(uint64) (runs: 256, μ: 543773, ~: 543860) +CreateAddressTest:testFuzzComputeAddressSelfRevertTooHighNonce(uint256) (runs: 256, μ: 12721, ~: 12684) +ECDSATest:testEthSignedMessageHash() (gas: 8735) +ECDSATest:testFuzzEthSignedMessageHash(string) (runs: 256, μ: 9321, ~: 9315) ECDSATest:testFuzzRecoverWithInvalidSignature(bytes,string) (runs: 256, μ: 15516, ~: 15518) ECDSATest:testFuzzRecoverWithTooLongSignature(bytes,string) (runs: 256, μ: 13999, ~: 14002) ECDSATest:testFuzzRecoverWithValidSignature(string,string) (runs: 256, μ: 22416, ~: 22477) ECDSATest:testFuzzRecoverWithWrongMessage(string,string,bytes32) (runs: 256, μ: 22435, ~: 22381) -ECDSATest:testFuzzToDataWithIntendedValidatorHash(address,bytes) (runs: 256, μ: 10184, ~: 10170) -ECDSATest:testFuzzToDataWithIntendedValidatorHashSelf(bytes) (runs: 256, μ: 12212, ~: 12195) -ECDSATest:testFuzzToTypedDataHash(string,string) (runs: 256, μ: 9936, ~: 9937) +ECDSATest:testFuzzToDataWithIntendedValidatorHash(address,bytes) (runs: 256, μ: 10187, ~: 10173) +ECDSATest:testFuzzToDataWithIntendedValidatorHashSelf(bytes) (runs: 256, μ: 12216, ~: 12199) +ECDSATest:testFuzzToTypedDataHash(string,string) (runs: 256, μ: 9939, ~: 9940) ECDSATest:testRecoverWith0x00Value() (gas: 15622) ECDSATest:testRecoverWithArbitraryMessage() (gas: 21344) ECDSATest:testRecoverWithCorrectVersion() (gas: 22086) @@ -126,80 +126,80 @@ ECDSATest:testRecoverWithTooShortSignature() (gas: 14304) ECDSATest:testRecoverWithValidSignature() (gas: 21337) ECDSATest:testRecoverWithWrongMessage() (gas: 21414) ECDSATest:testRecoverWithWrongVersion() (gas: 15651) -ECDSATest:testToDataWithIntendedValidatorHash() (gas: 11979) -ECDSATest:testToDataWithIntendedValidatorHashSelf() (gas: 12367) -ECDSATest:testToTypedDataHash() (gas: 8823) +ECDSATest:testToDataWithIntendedValidatorHash() (gas: 11982) +ECDSATest:testToDataWithIntendedValidatorHashSelf() (gas: 12371) +ECDSATest:testToTypedDataHash() (gas: 8826) EIP712DomainSeparatorTest:testCachedDomainSeparatorV4() (gas: 10440) EIP712DomainSeparatorTest:testDomainSeparatorV4() (gas: 11715) EIP712DomainSeparatorTest:testEIP712Domain() (gas: 18648) -EIP712DomainSeparatorTest:testFuzzDomainSeparatorV4(uint8) (runs: 256, μ: 11867, ~: 11890) -EIP712DomainSeparatorTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22002, ~: 21958) -EIP712DomainSeparatorTest:testFuzzHashTypedDataV4(address,address,uint256,uint256,uint64) (runs: 256, μ: 10574, ~: 10574) -EIP712DomainSeparatorTest:testHashTypedDataV4() (gas: 13520) +EIP712DomainSeparatorTest:testFuzzDomainSeparatorV4(uint8) (runs: 256, μ: 11868, ~: 11890) +EIP712DomainSeparatorTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22003, ~: 21965) +EIP712DomainSeparatorTest:testFuzzHashTypedDataV4(address,address,uint256,uint256,uint64) (runs: 256, μ: 10577, ~: 10577) +EIP712DomainSeparatorTest:testHashTypedDataV4() (gas: 13523) ERC1155Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3437) -ERC1155Test:testBalanceOfBatchCase1() (gas: 281432) -ERC1155Test:testBalanceOfBatchCase2() (gas: 236002) +ERC1155Test:testBalanceOfBatchCase1() (gas: 281340) +ERC1155Test:testBalanceOfBatchCase2() (gas: 235910) ERC1155Test:testBalanceOfBatchCase3() (gas: 38322) ERC1155Test:testBalanceOfBatchLengthsMismatch() (gas: 26717) ERC1155Test:testBalanceOfBatchZeroAddress() (gas: 17875) ERC1155Test:testBalanceOfCase1() (gas: 146733) ERC1155Test:testBalanceOfCase2() (gas: 22617) ERC1155Test:testBalanceOfZeroAddress() (gas: 11061) -ERC1155Test:testBurnAmountExceedsBalance() (gas: 129983) +ERC1155Test:testBurnAmountExceedsBalance() (gas: 129937) ERC1155Test:testBurnBatchAmountExceedsBalance() (gas: 197353) -ERC1155Test:testBurnBatchByApprovedOperator() (gas: 251569) -ERC1155Test:testBurnBatchByNotApprovedOperator() (gas: 31835) +ERC1155Test:testBurnBatchByApprovedOperator() (gas: 251644) +ERC1155Test:testBurnBatchByNotApprovedOperator() (gas: 31836) ERC1155Test:testBurnBatchFromZeroAddress() (gas: 25983) ERC1155Test:testBurnBatchLengthsMismatch() (gas: 41694) ERC1155Test:testBurnBatchNonExistentTokenIds() (gas: 28292) -ERC1155Test:testBurnBatchSuccess() (gas: 216255) -ERC1155Test:testBurnByApprovedOperator() (gas: 199116) -ERC1155Test:testBurnByNotApprovedOperator() (gas: 148390) +ERC1155Test:testBurnBatchSuccess() (gas: 216328) +ERC1155Test:testBurnByApprovedOperator() (gas: 199118) +ERC1155Test:testBurnByNotApprovedOperator() (gas: 148345) ERC1155Test:testBurnFromZeroAddress() (gas: 17362) ERC1155Test:testBurnNonExistentTokenId() (gas: 21540) -ERC1155Test:testBurnSuccess() (gas: 143274) -ERC1155Test:testExistsAfterBatchBurn() (gas: 132440) -ERC1155Test:testExistsAfterBatchMint() (gas: 144029) -ERC1155Test:testExistsAfterSingleBurn() (gas: 138531) -ERC1155Test:testExistsAfterSingleMint() (gas: 119756) -ERC1155Test:testExistsBeforeMint() (gas: 10504) -ERC1155Test:testFuzzBurnBatchSuccess(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 133511, ~: 133519) -ERC1155Test:testFuzzBurnSuccess(address,address,uint256) (runs: 256, μ: 141241, ~: 141241) +ERC1155Test:testBurnSuccess() (gas: 143251) +ERC1155Test:testExistsAfterBatchBurn() (gas: 132403) +ERC1155Test:testExistsAfterBatchMint() (gas: 143983) +ERC1155Test:testExistsAfterSingleBurn() (gas: 138439) +ERC1155Test:testExistsAfterSingleMint() (gas: 119687) +ERC1155Test:testExistsBeforeMint() (gas: 10481) +ERC1155Test:testFuzzBurnBatchSuccess(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 133529, ~: 133544) +ERC1155Test:testFuzzBurnSuccess(address,address,uint256) (runs: 256, μ: 141208, ~: 141218) ERC1155Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13977, ~: 13977) ERC1155Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48746, ~: 48730) -ERC1155Test:testFuzzSafeBatchTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 227425, ~: 227396) -ERC1155Test:testFuzzSafeBatchTransferFromEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 191814, ~: 191771) -ERC1155Test:testFuzzSafeBatchTransferFromNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 565611, ~: 565631) -ERC1155Test:testFuzzSafeBatchTransferFromWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 566190, ~: 565788) -ERC1155Test:testFuzzSafeMintBatchEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 153701, ~: 153689) -ERC1155Test:testFuzzSafeMintBatchNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521418, ~: 521418) +ERC1155Test:testFuzzSafeBatchTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 227427, ~: 227398) +ERC1155Test:testFuzzSafeBatchTransferFromEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 191804, ~: 191771) +ERC1155Test:testFuzzSafeBatchTransferFromNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 565631, ~: 565631) +ERC1155Test:testFuzzSafeBatchTransferFromWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 566227, ~: 565788) +ERC1155Test:testFuzzSafeMintBatchEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 153756, ~: 153735) +ERC1155Test:testFuzzSafeMintBatchNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521454, ~: 521464) ERC1155Test:testFuzzSafeMintBatchNonMinter(address) (runs: 256, μ: 40926, ~: 40926) -ERC1155Test:testFuzzSafeMintBatchWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521784, ~: 522014) -ERC1155Test:testFuzzSafeMintEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 152766, ~: 152741) -ERC1155Test:testFuzzSafeMintNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521600, ~: 521600) -ERC1155Test:testFuzzSafeMintNonMinter(address) (runs: 256, μ: 33132, ~: 33132) +ERC1155Test:testFuzzSafeMintBatchWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521787, ~: 521579) +ERC1155Test:testFuzzSafeMintEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 152776, ~: 152741) +ERC1155Test:testFuzzSafeMintNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521590, ~: 521600) +ERC1155Test:testFuzzSafeMintNonMinter(address) (runs: 256, μ: 33086, ~: 33086) ERC1155Test:testFuzzSafeMintWithData(address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 522877, ~: 522470) -ERC1155Test:testFuzzSafeTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 206443, ~: 206405) -ERC1155Test:testFuzzSafeTransferFromEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 170919, ~: 170867) -ERC1155Test:testFuzzSafeTransferFromNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 610063, ~: 610073) -ERC1155Test:testFuzzSafeTransferFromWithData(address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 612045, ~: 611335) -ERC1155Test:testFuzzSetApprovalForAllRevoke(address,address) (runs: 256, μ: 31914, ~: 31884) -ERC1155Test:testFuzzSetApprovalForAllSuccess(address,address) (runs: 256, μ: 45258, ~: 45258) +ERC1155Test:testFuzzSafeTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 206399, ~: 206361) +ERC1155Test:testFuzzSafeTransferFromEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 170863, ~: 170821) +ERC1155Test:testFuzzSafeTransferFromNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 610019, ~: 610029) +ERC1155Test:testFuzzSafeTransferFromWithData(address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 612011, ~: 611291) +ERC1155Test:testFuzzSetApprovalForAllRevoke(address,address) (runs: 256, μ: 31972, ~: 31943) +ERC1155Test:testFuzzSetApprovalForAllSuccess(address,address) (runs: 256, μ: 45332, ~: 45332) ERC1155Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15772, ~: 15699) ERC1155Test:testFuzzSetMinterSuccess(string) (runs: 256, μ: 33755, ~: 33755) -ERC1155Test:testFuzzSetUriNonMinter(address) (runs: 256, μ: 14452, ~: 14452) -ERC1155Test:testFuzzTotalSupplyAfterBatchBurn(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 126961, ~: 126968) -ERC1155Test:testFuzzTotalSupplyAfterBatchMint(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 141705, ~: 141651) -ERC1155Test:testFuzzTotalSupplyAfterSingleBurn(address,uint256,bytes) (runs: 256, μ: 138405, ~: 138376) -ERC1155Test:testFuzzTotalSupplyAfterSingleMint(uint256,uint256,bytes) (runs: 256, μ: 94820, ~: 120208) +ERC1155Test:testFuzzSetUriNonMinter(address) (runs: 256, μ: 14455, ~: 14455) +ERC1155Test:testFuzzTotalSupplyAfterBatchBurn(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 126978, ~: 126994) +ERC1155Test:testFuzzTotalSupplyAfterBatchMint(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 141766, ~: 141830) +ERC1155Test:testFuzzTotalSupplyAfterSingleBurn(address,uint256,bytes) (runs: 256, μ: 138383, ~: 138353) +ERC1155Test:testFuzzTotalSupplyAfterSingleMint(uint256,uint256,bytes) (runs: 256, μ: 94797, ~: 120185) ERC1155Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14086, ~: 14086) -ERC1155Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75734, ~: 75704) +ERC1155Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75732, ~: 75704) ERC1155Test:testHasOwner() (gas: 12615) -ERC1155Test:testInitialSetup() (gas: 2812899) +ERC1155Test:testInitialSetup() (gas: 2799169) ERC1155Test:testRenounceOwnershipNonOwner() (gas: 10918) ERC1155Test:testRenounceOwnershipSuccess() (gas: 22915) -ERC1155Test:testSafeBatchTransferFromByApprovedOperator() (gas: 342145) -ERC1155Test:testSafeBatchTransferFromByNotApprovedOperator() (gas: 261056) +ERC1155Test:testSafeBatchTransferFromByApprovedOperator() (gas: 342147) +ERC1155Test:testSafeBatchTransferFromByNotApprovedOperator() (gas: 261057) ERC1155Test:testSafeBatchTransferFromEOAReceiver() (gas: 298206) ERC1155Test:testSafeBatchTransferFromInsufficientBalance() (gas: 267873) ERC1155Test:testSafeBatchTransferFromLengthsMismatch() (gas: 64116) @@ -210,9 +210,9 @@ ERC1155Test:testSafeBatchTransferFromReceiverReverts() (gas: 642559) ERC1155Test:testSafeBatchTransferFromReceiverRevertsOnlySingle() (gas: 674332) ERC1155Test:testSafeBatchTransferFromToZeroAddress() (gas: 257753) ERC1155Test:testSafeBatchTransferFromWithData() (gas: 676038) -ERC1155Test:testSafeMintBatchEOAReceiver() (gas: 249521) +ERC1155Test:testSafeMintBatchEOAReceiver() (gas: 249613) ERC1155Test:testSafeMintBatchLengthsMismatch() (gas: 66500) -ERC1155Test:testSafeMintBatchNoData() (gas: 618728) +ERC1155Test:testSafeMintBatchNoData() (gas: 618820) ERC1155Test:testSafeMintBatchNonMinter() (gas: 39827) ERC1155Test:testSafeMintBatchOverflow() (gas: 265262) ERC1155Test:testSafeMintBatchReceiverFunctionNotImplemented() (gas: 226871) @@ -223,12 +223,12 @@ ERC1155Test:testSafeMintBatchToZeroAddress() (gas: 40894) ERC1155Test:testSafeMintBatchWithData() (gas: 619670) ERC1155Test:testSafeMintEOAReceiver() (gas: 149958) ERC1155Test:testSafeMintNoData() (gas: 518170) -ERC1155Test:testSafeMintNonMinter() (gas: 32079) -ERC1155Test:testSafeMintOverflow() (gas: 92104) -ERC1155Test:testSafeMintReceiverFunctionNotImplemented() (gas: 136348) -ERC1155Test:testSafeMintReceiverInvalidReturnIdentifier() (gas: 508148) -ERC1155Test:testSafeMintReceiverReverts() (gas: 501907) -ERC1155Test:testSafeMintToZeroAddress() (gas: 33064) +ERC1155Test:testSafeMintNonMinter() (gas: 32033) +ERC1155Test:testSafeMintOverflow() (gas: 92058) +ERC1155Test:testSafeMintReceiverFunctionNotImplemented() (gas: 136302) +ERC1155Test:testSafeMintReceiverInvalidReturnIdentifier() (gas: 508102) +ERC1155Test:testSafeMintReceiverReverts() (gas: 501861) +ERC1155Test:testSafeMintToZeroAddress() (gas: 33018) ERC1155Test:testSafeMintWithData() (gas: 519971) ERC1155Test:testSafeTransferFromByApprovedOperator() (gas: 206858) ERC1155Test:testSafeTransferFromByNotApprovedOperator() (gas: 150934) @@ -247,214 +247,214 @@ ERC1155Test:testSetMinterNonOwner() (gas: 12717) ERC1155Test:testSetMinterRemoveOwnerAddress() (gas: 13770) ERC1155Test:testSetMinterSuccess() (gas: 33587) ERC1155Test:testSetMinterToZeroAddress() (gas: 15768) -ERC1155Test:testSetUri() (gas: 69232) -ERC1155Test:testSetUriEmpty() (gas: 27504) -ERC1155Test:testSetUriNonMinter() (gas: 13456) +ERC1155Test:testSetUri() (gas: 69238) +ERC1155Test:testSetUriEmpty() (gas: 27508) +ERC1155Test:testSetUriNonMinter() (gas: 13459) ERC1155Test:testSupportsInterfaceInvalidInterfaceId() (gas: 8402) ERC1155Test:testSupportsInterfaceInvalidInterfaceIdGasCost() (gas: 9280) ERC1155Test:testSupportsInterfaceSuccess() (gas: 10924) ERC1155Test:testSupportsInterfaceSuccessGasCost() (gas: 9387) -ERC1155Test:testTotalSupplyAfterBatchBurn() (gas: 132335) -ERC1155Test:testTotalSupplyAfterBatchMint() (gas: 143898) -ERC1155Test:testTotalSupplyAfterSingleBurn() (gas: 135287) -ERC1155Test:testTotalSupplyAfterSingleMint() (gas: 119654) -ERC1155Test:testTotalSupplyBeforeMint() (gas: 10437) +ERC1155Test:testTotalSupplyAfterBatchBurn() (gas: 132372) +ERC1155Test:testTotalSupplyAfterBatchMint() (gas: 143944) +ERC1155Test:testTotalSupplyAfterSingleBurn() (gas: 135264) +ERC1155Test:testTotalSupplyAfterSingleMint() (gas: 119631) +ERC1155Test:testTotalSupplyBeforeMint() (gas: 10460) ERC1155Test:testTransferOwnershipNonOwner() (gas: 12652) ERC1155Test:testTransferOwnershipSuccess() (gas: 54040) ERC1155Test:testTransferOwnershipToZeroAddress() (gas: 15672) -ERC1155Test:testUriBaseAndTokenUriNotSet() (gas: 2768631) -ERC1155Test:testUriBaseAndTokenUriSet() (gas: 65804) -ERC1155Test:testUriNoBaseURI() (gas: 2818691) -ERC1155Test:testUriNoTokenUri() (gas: 20502) -ERC20Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3392) -ERC20Invariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3392) -ERC20Test:testApproveExceedingBalanceCase1() (gas: 40945) -ERC20Test:testApproveExceedingBalanceCase2() (gas: 47928) +ERC1155Test:testUriBaseAndTokenUriNotSet() (gas: 2754895) +ERC1155Test:testUriBaseAndTokenUriSet() (gas: 65810) +ERC1155Test:testUriNoBaseURI() (gas: 2804957) +ERC1155Test:testUriNoTokenUri() (gas: 20507) +ERC20Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3393) +ERC20Invariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3393) +ERC20Test:testApproveExceedingBalanceCase1() (gas: 40968) +ERC20Test:testApproveExceedingBalanceCase2() (gas: 47974) ERC20Test:testApproveFromZeroAddress() (gas: 13220) -ERC20Test:testApproveSuccessCase1() (gas: 43647) -ERC20Test:testApproveSuccessCase2() (gas: 50712) -ERC20Test:testApproveToZeroAddress() (gas: 16512) -ERC20Test:testBalanceOf() (gas: 18666) -ERC20Test:testBurnFromExceedingBalance() (gas: 31174) -ERC20Test:testBurnFromFromZeroAddress() (gas: 15618) -ERC20Test:testBurnFromInsufficientAllowanceCase1() (gas: 41651) -ERC20Test:testBurnFromInsufficientAllowanceCase2() (gas: 41682) -ERC20Test:testBurnFromSuccessCase1() (gas: 40254) -ERC20Test:testBurnFromSuccessCase2() (gas: 65807) -ERC20Test:testBurnFromUnlimitedAllowance() (gas: 50630) +ERC20Test:testApproveSuccessCase1() (gas: 43671) +ERC20Test:testApproveSuccessCase2() (gas: 50759) +ERC20Test:testApproveToZeroAddress() (gas: 16513) +ERC20Test:testBalanceOf() (gas: 18668) +ERC20Test:testBurnFromExceedingBalance() (gas: 31146) +ERC20Test:testBurnFromFromZeroAddress() (gas: 15581) +ERC20Test:testBurnFromInsufficientAllowanceCase1() (gas: 41615) +ERC20Test:testBurnFromInsufficientAllowanceCase2() (gas: 41646) +ERC20Test:testBurnFromSuccessCase1() (gas: 40267) +ERC20Test:testBurnFromSuccessCase2() (gas: 65820) +ERC20Test:testBurnFromUnlimitedAllowance() (gas: 50620) ERC20Test:testBurnFromZeroAddress() (gas: 11324) -ERC20Test:testBurnInvalidAmount() (gas: 14498) -ERC20Test:testBurnSuccessCase1() (gas: 25793) -ERC20Test:testBurnSuccessCase2() (gas: 31358) +ERC20Test:testBurnInvalidAmount() (gas: 14500) +ERC20Test:testBurnSuccessCase1() (gas: 25797) +ERC20Test:testBurnSuccessCase2() (gas: 31362) ERC20Test:testCachedDomainSeparator() (gas: 10588) ERC20Test:testDomainSeparator() (gas: 11838) ERC20Test:testEIP712Domain() (gas: 18802) -ERC20Test:testFuzzApproveSuccess(address,uint256) (runs: 256, μ: 39843, ~: 41165) -ERC20Test:testFuzzBurnFromInsufficientAllowance(address,uint256,uint8) (runs: 256, μ: 207232, ~: 207422) -ERC20Test:testFuzzBurnFromSuccess(address,uint256) (runs: 256, μ: 340565, ~: 341740) -ERC20Test:testFuzzBurnInvalidAmount(address,uint256) (runs: 256, μ: 16454, ~: 16454) -ERC20Test:testFuzzBurnSuccessCase(uint256) (runs: 256, μ: 316134, ~: 315920) -ERC20Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12053, ~: 12074) +ERC20Test:testFuzzApproveSuccess(address,uint256) (runs: 256, μ: 39944, ~: 41188) +ERC20Test:testFuzzBurnFromInsufficientAllowance(address,uint256,uint8) (runs: 256, μ: 207344, ~: 207399) +ERC20Test:testFuzzBurnFromSuccess(address,uint256) (runs: 256, μ: 340569, ~: 341736) +ERC20Test:testFuzzBurnInvalidAmount(address,uint256) (runs: 256, μ: 16455, ~: 16455) +ERC20Test:testFuzzBurnSuccessCase(uint256) (runs: 256, μ: 316128, ~: 315927) +ERC20Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12054, ~: 12074) ERC20Test:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22257, ~: 22218) ERC20Test:testFuzzMintNonMinter(string,uint256) (runs: 256, μ: 13152, ~: 13080) -ERC20Test:testFuzzMintSuccess(string,uint256) (runs: 256, μ: 54960, ~: 55933) -ERC20Test:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 45279, ~: 45277) -ERC20Test:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 71037, ~: 71033) -ERC20Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13979, ~: 13979) -ERC20Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48675, ~: 48659) +ERC20Test:testFuzzMintSuccess(string,uint256) (runs: 256, μ: 54864, ~: 55936) +ERC20Test:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 45302, ~: 45300) +ERC20Test:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 71106, ~: 71102) +ERC20Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13956, ~: 13956) +ERC20Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48657, ~: 48640) ERC20Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15777, ~: 15704) ERC20Test:testFuzzSetMinterSuccess(string) (runs: 256, μ: 33773, ~: 33772) -ERC20Test:testFuzzTransferFromInsufficientAllowance(address,address,uint256,uint8) (runs: 256, μ: 205638, ~: 205904) -ERC20Test:testFuzzTransferFromSuccess(address,address,uint256) (runs: 256, μ: 233536, ~: 235763) -ERC20Test:testFuzzTransferInvalidAmount(address,address,uint256) (runs: 256, μ: 16849, ~: 16849) +ERC20Test:testFuzzTransferFromInsufficientAllowance(address,address,uint256,uint8) (runs: 256, μ: 205629, ~: 205907) +ERC20Test:testFuzzTransferFromSuccess(address,address,uint256) (runs: 256, μ: 233550, ~: 235790) +ERC20Test:testFuzzTransferInvalidAmount(address,address,uint256) (runs: 256, μ: 16850, ~: 16850) ERC20Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14068, ~: 14068) -ERC20Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75677, ~: 75650) -ERC20Test:testFuzzTransferSuccess(address,uint256) (runs: 256, μ: 205906, ~: 206896) +ERC20Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75678, ~: 75650) +ERC20Test:testFuzzTransferSuccess(address,uint256) (runs: 256, μ: 205915, ~: 206904) ERC20Test:testHasOwner() (gas: 12659) -ERC20Test:testInitialSetup() (gas: 1472592) +ERC20Test:testInitialSetup() (gas: 1459670) ERC20Test:testMintNonMinter() (gas: 12639) ERC20Test:testMintOverflow() (gas: 16962) -ERC20Test:testMintSuccess() (gas: 51983) +ERC20Test:testMintSuccess() (gas: 51986) ERC20Test:testMintToZeroAddress() (gas: 15617) -ERC20Test:testPermitBadChainId() (gas: 43804) +ERC20Test:testPermitBadChainId() (gas: 43827) ERC20Test:testPermitBadNonce() (gas: 40932) -ERC20Test:testPermitExpiredDeadline() (gas: 17385) -ERC20Test:testPermitOtherSignature() (gas: 41873) -ERC20Test:testPermitReplaySignature() (gas: 73748) -ERC20Test:testPermitSuccess() (gas: 70003) -ERC20Test:testRenounceOwnershipNonOwner() (gas: 10856) -ERC20Test:testRenounceOwnershipSuccess() (gas: 22936) +ERC20Test:testPermitExpiredDeadline() (gas: 17408) +ERC20Test:testPermitOtherSignature() (gas: 41896) +ERC20Test:testPermitReplaySignature() (gas: 73771) +ERC20Test:testPermitSuccess() (gas: 70072) +ERC20Test:testRenounceOwnershipNonOwner() (gas: 10833) +ERC20Test:testRenounceOwnershipSuccess() (gas: 22913) ERC20Test:testSetMinterNonOwner() (gas: 12721) ERC20Test:testSetMinterRemoveOwnerAddress() (gas: 13709) ERC20Test:testSetMinterSuccess() (gas: 33516) ERC20Test:testSetMinterToZeroAddress() (gas: 15706) ERC20Test:testTotalSupply() (gas: 11555) -ERC20Test:testTransferFromExceedingBalance() (gas: 32556) +ERC20Test:testTransferFromExceedingBalance() (gas: 32557) ERC20Test:testTransferFromFromZeroAddress() (gas: 17778) -ERC20Test:testTransferFromInsufficientAllowanceCase1() (gas: 43429) -ERC20Test:testTransferFromInsufficientAllowanceCase2() (gas: 43438) -ERC20Test:testTransferFromSuccess() (gas: 61724) +ERC20Test:testTransferFromInsufficientAllowanceCase1() (gas: 43430) +ERC20Test:testTransferFromInsufficientAllowanceCase2() (gas: 43439) +ERC20Test:testTransferFromSuccess() (gas: 61766) ERC20Test:testTransferFromToZeroAddress() (gas: 32620) -ERC20Test:testTransferFromUnlimitedAllowance() (gas: 72074) -ERC20Test:testTransferFromZeroAddress() (gas: 19689) -ERC20Test:testTransferInvalidAmount() (gas: 15473) +ERC20Test:testTransferFromUnlimitedAllowance() (gas: 72104) +ERC20Test:testTransferFromZeroAddress() (gas: 19692) +ERC20Test:testTransferInvalidAmount() (gas: 15474) ERC20Test:testTransferOwnershipNonOwner() (gas: 12611) ERC20Test:testTransferOwnershipSuccess() (gas: 54038) ERC20Test:testTransferOwnershipToZeroAddress() (gas: 15586) -ERC20Test:testTransferSuccess() (gas: 43245) -ERC20Test:testTransferToZeroAddress() (gas: 16457) -ERC20Test:testTransferZeroTokens() (gas: 25418) +ERC20Test:testTransferSuccess() (gas: 43252) +ERC20Test:testTransferToZeroAddress() (gas: 16458) +ERC20Test:testTransferZeroTokens() (gas: 25425) ERC2981Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3840) -ERC2981Test:testDeleteDefaultRoyaltyNonOwner() (gas: 10537) -ERC2981Test:testFuzzDeleteDefaultRoyaltyNonOwner(address) (runs: 256, μ: 13271, ~: 13271) -ERC2981Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13972, ~: 13972) -ERC2981Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 25300, ~: 25300) -ERC2981Test:testFuzzResetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 96614, ~: 97941) -ERC2981Test:testFuzzResetTokenRoyaltyNonOwner(address) (runs: 256, μ: 13246, ~: 13246) -ERC2981Test:testFuzzRoyaltyInfoDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 80184, ~: 81403) -ERC2981Test:testFuzzRoyaltyInfoDeleteDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 65104, ~: 66104) -ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 121828, ~: 122878) -ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyaltyUpdate(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 168056, ~: 169572) -ERC2981Test:testFuzzRoyaltyInfoUpdateDefaultRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 88068, ~: 89091) -ERC2981Test:testFuzzSetDefaultRoyaltyNonOwner(address) (runs: 256, μ: 15525, ~: 15525) -ERC2981Test:testFuzzSetDefaultRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21346, ~: 21137) -ERC2981Test:testFuzzSetTokenRoyaltyInvalidReceiver(address) (runs: 256, μ: 18626, ~: 18626) -ERC2981Test:testFuzzSetTokenRoyaltyNonOwner(address) (runs: 256, μ: 15565, ~: 15565) -ERC2981Test:testFuzzSetTokenRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21387, ~: 21178) -ERC2981Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14039, ~: 14039) -ERC2981Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 30279, ~: 30279) -ERC2981Test:testHasOwner() (gas: 12548) -ERC2981Test:testInitialSetup() (gas: 471061) -ERC2981Test:testRenounceOwnershipNonOwner() (gas: 10871) -ERC2981Test:testRenounceOwnershipSuccess() (gas: 18044) -ERC2981Test:testResetTokenRoyalty() (gas: 94644) -ERC2981Test:testResetTokenRoyaltyNonOwner() (gas: 10597) -ERC2981Test:testRoyaltyInfoDefaultRoyalty() (gas: 75063) -ERC2981Test:testRoyaltyInfoDeleteDefaultRoyalty() (gas: 62938) -ERC2981Test:testRoyaltyInfoRoyaltyAmountOverflow() (gas: 67695) -ERC2981Test:testRoyaltyInfoSetTokenRoyalty() (gas: 118350) -ERC2981Test:testRoyaltyInfoSetTokenRoyaltyUpdate() (gas: 165000) -ERC2981Test:testRoyaltyInfoUpdateDefaultRoyalty() (gas: 84104) -ERC2981Test:testSetDefaultRoyaltyInvalidReceiver() (gas: 17949) -ERC2981Test:testSetDefaultRoyaltyNonOwner() (gas: 12878) -ERC2981Test:testSetDefaultRoyaltyTooHighFeeNumerator() (gas: 17466) -ERC2981Test:testSetTokenRoyaltyInvalidReceiver() (gas: 17958) -ERC2981Test:testSetTokenRoyaltyNonOwner() (gas: 12852) -ERC2981Test:testSetTokenRoyaltyTooHighFeeNumerator() (gas: 17529) +ERC2981Test:testDeleteDefaultRoyaltyNonOwner() (gas: 10538) +ERC2981Test:testFuzzDeleteDefaultRoyaltyNonOwner(address) (runs: 256, μ: 13272, ~: 13272) +ERC2981Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13973, ~: 13973) +ERC2981Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 25308, ~: 25308) +ERC2981Test:testFuzzResetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 96744, ~: 97951) +ERC2981Test:testFuzzResetTokenRoyaltyNonOwner(address) (runs: 256, μ: 13247, ~: 13247) +ERC2981Test:testFuzzRoyaltyInfoDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 80344, ~: 81404) +ERC2981Test:testFuzzRoyaltyInfoDeleteDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 64921, ~: 66104) +ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 121557, ~: 122880) +ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyaltyUpdate(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 167630, ~: 169575) +ERC2981Test:testFuzzRoyaltyInfoUpdateDefaultRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 88266, ~: 89093) +ERC2981Test:testFuzzSetDefaultRoyaltyNonOwner(address) (runs: 256, μ: 15526, ~: 15526) +ERC2981Test:testFuzzSetDefaultRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21354, ~: 21138) +ERC2981Test:testFuzzSetTokenRoyaltyInvalidReceiver(address) (runs: 256, μ: 18627, ~: 18627) +ERC2981Test:testFuzzSetTokenRoyaltyNonOwner(address) (runs: 256, μ: 15566, ~: 15566) +ERC2981Test:testFuzzSetTokenRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21395, ~: 21179) +ERC2981Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14040, ~: 14040) +ERC2981Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 30287, ~: 30287) +ERC2981Test:testHasOwner() (gas: 12549) +ERC2981Test:testInitialSetup() (gas: 467859) +ERC2981Test:testRenounceOwnershipNonOwner() (gas: 10872) +ERC2981Test:testRenounceOwnershipSuccess() (gas: 18048) +ERC2981Test:testResetTokenRoyalty() (gas: 94647) +ERC2981Test:testResetTokenRoyaltyNonOwner() (gas: 10598) +ERC2981Test:testRoyaltyInfoDefaultRoyalty() (gas: 75064) +ERC2981Test:testRoyaltyInfoDeleteDefaultRoyalty() (gas: 62940) +ERC2981Test:testRoyaltyInfoRoyaltyAmountOverflow() (gas: 67696) +ERC2981Test:testRoyaltyInfoSetTokenRoyalty() (gas: 118352) +ERC2981Test:testRoyaltyInfoSetTokenRoyaltyUpdate() (gas: 165003) +ERC2981Test:testRoyaltyInfoUpdateDefaultRoyalty() (gas: 84106) +ERC2981Test:testSetDefaultRoyaltyInvalidReceiver() (gas: 17950) +ERC2981Test:testSetDefaultRoyaltyNonOwner() (gas: 12879) +ERC2981Test:testSetDefaultRoyaltyTooHighFeeNumerator() (gas: 17467) +ERC2981Test:testSetTokenRoyaltyInvalidReceiver() (gas: 17959) +ERC2981Test:testSetTokenRoyaltyNonOwner() (gas: 12853) +ERC2981Test:testSetTokenRoyaltyTooHighFeeNumerator() (gas: 17530) ERC2981Test:testSupportsInterfaceInvalidInterfaceId() (gas: 8354) ERC2981Test:testSupportsInterfaceInvalidInterfaceIdGasCost() (gas: 9241) ERC2981Test:testSupportsInterfaceSuccess() (gas: 9501) ERC2981Test:testSupportsInterfaceSuccessGasCost() (gas: 9207) -ERC2981Test:testTransferOwnershipNonOwner() (gas: 12649) -ERC2981Test:testTransferOwnershipSuccess() (gas: 22442) -ERC2981Test:testTransferOwnershipToZeroAddress() (gas: 15557) -ERC4626VaultInvariants:invariantTotalAssets() (runs: 256, calls: 3840, reverts: 3243) -ERC4626VaultInvariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3243) +ERC2981Test:testTransferOwnershipNonOwner() (gas: 12650) +ERC2981Test:testTransferOwnershipSuccess() (gas: 22446) +ERC2981Test:testTransferOwnershipToZeroAddress() (gas: 15558) +ERC4626VaultInvariants:invariantTotalAssets() (runs: 256, calls: 3840, reverts: 3242) +ERC4626VaultInvariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3242) ERC4626VaultTest:testCachedDomainSeparator() (gas: 10565) -ERC4626VaultTest:testDepositInsufficientAllowance() (gas: 82814) -ERC4626VaultTest:testDepositWithNoApproval() (gas: 24749) -ERC4626VaultTest:testDepositZero() (gas: 41119) +ERC4626VaultTest:testDepositInsufficientAllowance() (gas: 82791) +ERC4626VaultTest:testDepositWithNoApproval() (gas: 24726) +ERC4626VaultTest:testDepositZero() (gas: 41123) ERC4626VaultTest:testDomainSeparator() (gas: 11928) ERC4626VaultTest:testEIP712Domain() (gas: 18807) -ERC4626VaultTest:testEmptyVaultDeposit() (gas: 567812) -ERC4626VaultTest:testEmptyVaultMint() (gas: 568629) -ERC4626VaultTest:testEmptyVaultRedeem() (gas: 203011) -ERC4626VaultTest:testEmptyVaultwithdraw() (gas: 215856) -ERC4626VaultTest:testFail_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 554484, ~: 557800) -ERC4626VaultTest:testFail_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 556377, ~: 560208) -ERC4626VaultTest:testFuzzDomainSeparator(uint8) (runs: 256, μ: 11946, ~: 11966) -ERC4626VaultTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22181, ~: 22144) +ERC4626VaultTest:testEmptyVaultDeposit() (gas: 567828) +ERC4626VaultTest:testEmptyVaultMint() (gas: 568645) +ERC4626VaultTest:testEmptyVaultRedeem() (gas: 203127) +ERC4626VaultTest:testEmptyVaultwithdraw() (gas: 215972) +ERC4626VaultTest:testFail_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 554689, ~: 558238) +ERC4626VaultTest:testFail_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 556479, ~: 560079) +ERC4626VaultTest:testFuzzDomainSeparator(uint8) (runs: 256, μ: 11945, ~: 11966) +ERC4626VaultTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22183, ~: 22144) ERC4626VaultTest:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 45214, ~: 45212) ERC4626VaultTest:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 70960, ~: 70956) -ERC4626VaultTest:testInitialSetup() (gas: 5794290) +ERC4626VaultTest:testInitialSetup() (gas: 5691876) ERC4626VaultTest:testMintWithNoApproval() (gas: 24778) -ERC4626VaultTest:testMintZero() (gas: 41225) -ERC4626VaultTest:testMultipleMintDepositRedeemWithdraw() (gas: 377635) +ERC4626VaultTest:testMintZero() (gas: 41252) +ERC4626VaultTest:testMultipleMintDepositRedeemWithdraw() (gas: 377875) ERC4626VaultTest:testPermitBadChainId() (gas: 43863) ERC4626VaultTest:testPermitBadNonce() (gas: 40918) ERC4626VaultTest:testPermitExpiredDeadline() (gas: 17373) ERC4626VaultTest:testPermitOtherSignature() (gas: 41884) ERC4626VaultTest:testPermitReplaySignature() (gas: 73728) ERC4626VaultTest:testPermitSuccess() (gas: 70029) -ERC4626VaultTest:testRedeemInsufficientShares() (gas: 131100) -ERC4626VaultTest:testRedeemWithNoShares() (gas: 13375) -ERC4626VaultTest:testSingleDepositWithdraw() (gas: 178130) -ERC4626VaultTest:testSingleMintRedeem() (gas: 176943) -ERC4626VaultTest:testVaultInteractionsForSomeoneElse() (gas: 224464) -ERC4626VaultTest:testWithdrawInsufficientAllowance() (gas: 122557) -ERC4626VaultTest:testWithdrawInsufficientAssets() (gas: 117837) -ERC4626VaultTest:testWithdrawWithNoAssets() (gas: 21336) -ERC4626VaultTest:test_RT_deposit_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473734, ~: 476310) -ERC4626VaultTest:test_RT_deposit_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 475609, ~: 477967) -ERC4626VaultTest:test_RT_mint_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474670, ~: 476379) -ERC4626VaultTest:test_RT_mint_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 476685, ~: 478099) -ERC4626VaultTest:test_RT_redeem_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473696, ~: 476573) -ERC4626VaultTest:test_RT_redeem_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473892, ~: 476751) -ERC4626VaultTest:test_RT_withdraw_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 475311, ~: 478372) -ERC4626VaultTest:test_RT_withdraw_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 476547, ~: 478697) -ERC4626VaultTest:test_asset((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423474, ~: 427818) -ERC4626VaultTest:test_convertToAssets((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 429508, ~: 433008) -ERC4626VaultTest:test_convertToShares((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 429195, ~: 433223) -ERC4626VaultTest:test_deposit((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 470079, ~: 473856) -ERC4626VaultTest:test_maxDeposit((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423487, ~: 427831) -ERC4626VaultTest:test_maxMint((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423512, ~: 427856) -ERC4626VaultTest:test_maxRedeem((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423626, ~: 427970) -ERC4626VaultTest:test_maxWithdraw((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 425183, ~: 429667) -ERC4626VaultTest:test_mint((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 471053, ~: 474204) -ERC4626VaultTest:test_previewDeposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 466234, ~: 468684) -ERC4626VaultTest:test_previewMint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 467777, ~: 469480) -ERC4626VaultTest:test_previewRedeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 468131, ~: 470717) -ERC4626VaultTest:test_previewWithdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 470611, ~: 472447) -ERC4626VaultTest:test_redeem((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 474207, ~: 476824) -ERC4626VaultTest:test_totalAssets((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 424076, ~: 428420) -ERC4626VaultTest:test_withdraw((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 475492, ~: 478353) +ERC4626VaultTest:testRedeemInsufficientShares() (gas: 131080) +ERC4626VaultTest:testRedeemWithNoShares() (gas: 13376) +ERC4626VaultTest:testSingleDepositWithdraw() (gas: 178137) +ERC4626VaultTest:testSingleMintRedeem() (gas: 176968) +ERC4626VaultTest:testVaultInteractionsForSomeoneElse() (gas: 224457) +ERC4626VaultTest:testWithdrawInsufficientAllowance() (gas: 122541) +ERC4626VaultTest:testWithdrawInsufficientAssets() (gas: 117821) +ERC4626VaultTest:testWithdrawWithNoAssets() (gas: 21337) +ERC4626VaultTest:test_RT_deposit_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473462, ~: 476148) +ERC4626VaultTest:test_RT_deposit_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 475424, ~: 477896) +ERC4626VaultTest:test_RT_mint_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474735, ~: 476368) +ERC4626VaultTest:test_RT_mint_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 476807, ~: 478260) +ERC4626VaultTest:test_RT_redeem_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473602, ~: 476436) +ERC4626VaultTest:test_RT_redeem_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474050, ~: 476757) +ERC4626VaultTest:test_RT_withdraw_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 475167, ~: 478159) +ERC4626VaultTest:test_RT_withdraw_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 476400, ~: 478568) +ERC4626VaultTest:test_asset((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423619, ~: 427747) +ERC4626VaultTest:test_convertToAssets((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 429930, ~: 433124) +ERC4626VaultTest:test_convertToShares((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 429163, ~: 433053) +ERC4626VaultTest:test_deposit((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 470361, ~: 473747) +ERC4626VaultTest:test_maxDeposit((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423614, ~: 427742) +ERC4626VaultTest:test_maxMint((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423639, ~: 427766) +ERC4626VaultTest:test_maxRedeem((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423754, ~: 427882) +ERC4626VaultTest:test_maxWithdraw((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 425298, ~: 429475) +ERC4626VaultTest:test_mint((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 471143, ~: 474074) +ERC4626VaultTest:test_previewDeposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 466316, ~: 468670) +ERC4626VaultTest:test_previewMint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 467744, ~: 469126) +ERC4626VaultTest:test_previewRedeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 468003, ~: 470416) +ERC4626VaultTest:test_previewWithdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 470708, ~: 472239) +ERC4626VaultTest:test_redeem((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 473839, ~: 476922) +ERC4626VaultTest:test_totalAssets((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 424203, ~: 428330) +ERC4626VaultTest:test_withdraw((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 475248, ~: 478287) ERC721Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3469) ERC721Invariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3469) ERC721Test:testApproveClearingApprovalWithNoPriorApproval() (gas: 177662) ERC721Test:testApproveClearingApprovalWithPriorApproval() (gas: 186718) -ERC721Test:testApproveFromApprovedAddress() (gas: 199707) -ERC721Test:testApproveFromNonOwner() (gas: 173500) -ERC721Test:testApproveFromOperatorAddress() (gas: 224617) +ERC721Test:testApproveFromApprovedAddress() (gas: 199708) +ERC721Test:testApproveFromNonOwner() (gas: 173501) +ERC721Test:testApproveFromOperatorAddress() (gas: 224596) ERC721Test:testApproveInvalidTokenId() (gas: 171496) ERC721Test:testApproveToOwner() (gas: 167882) ERC721Test:testApproveToZeroAddress() (gas: 186761) @@ -465,59 +465,59 @@ ERC721Test:testBalanceOfCase1() (gas: 329217) ERC721Test:testBalanceOfCase2() (gas: 12241) ERC721Test:testBalanceOfZeroAddress() (gas: 11015) ERC721Test:testBurnSuccess() (gas: 306577) -ERC721Test:testBurnSuccessViaApproveAndSetApprovalForAll() (gas: 372315) +ERC721Test:testBurnSuccessViaApproveAndSetApprovalForAll() (gas: 372299) ERC721Test:testCachedDomainSeparator() (gas: 10588) ERC721Test:testDomainSeparator() (gas: 11839) ERC721Test:testEIP712Domain() (gas: 18910) -ERC721Test:testFuzzApproveClearingApprovalWithNoPriorApproval(address,address) (runs: 256, μ: 197161, ~: 197161) -ERC721Test:testFuzzApproveClearingApprovalWithPriorApproval(address,address) (runs: 256, μ: 184786, ~: 184796) -ERC721Test:testFuzzApproveFromNonOwner(address) (runs: 256, μ: 172895, ~: 172895) -ERC721Test:testFuzzApproveFromOperatorAddress(address,address,address) (runs: 256, μ: 223320, ~: 223320) -ERC721Test:testFuzzApproveWithNoPriorApproval(address,address) (runs: 256, μ: 197116, ~: 197116) -ERC721Test:testFuzzApproveWithPriorApproval(address,address) (runs: 256, μ: 204608, ~: 204608) -ERC721Test:testFuzzBurnSuccess(address) (runs: 256, μ: 305917, ~: 305902) -ERC721Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12031, ~: 12052) -ERC721Test:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22357, ~: 22321) -ERC721Test:testFuzzGetApprovedApprovedTokenId(address,address) (runs: 256, μ: 194747, ~: 194747) -ERC721Test:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 201667, ~: 201665) -ERC721Test:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 227868, ~: 227864) +ERC721Test:testFuzzApproveClearingApprovalWithNoPriorApproval(address,address) (runs: 256, μ: 197151, ~: 197161) +ERC721Test:testFuzzApproveClearingApprovalWithPriorApproval(address,address) (runs: 256, μ: 184796, ~: 184796) +ERC721Test:testFuzzApproveFromNonOwner(address) (runs: 256, μ: 172896, ~: 172896) +ERC721Test:testFuzzApproveFromOperatorAddress(address,address,address) (runs: 256, μ: 223299, ~: 223299) +ERC721Test:testFuzzApproveWithNoPriorApproval(address,address) (runs: 256, μ: 197106, ~: 197116) +ERC721Test:testFuzzApproveWithPriorApproval(address,address) (runs: 256, μ: 204598, ~: 204608) +ERC721Test:testFuzzBurnSuccess(address) (runs: 256, μ: 305909, ~: 305902) +ERC721Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12032, ~: 12052) +ERC721Test:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22357, ~: 22314) +ERC721Test:testFuzzGetApprovedApprovedTokenId(address,address) (runs: 256, μ: 194737, ~: 194747) +ERC721Test:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 201644, ~: 201642) +ERC721Test:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 227845, ~: 227841) ERC721Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13938, ~: 13938) -ERC721Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48668, ~: 48653) +ERC721Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48670, ~: 48653) ERC721Test:testFuzzSafeMintNonMinter(address) (runs: 256, μ: 15894, ~: 15894) -ERC721Test:testFuzzSafeMintSuccess(address[]) (runs: 256, μ: 21048799, ~: 20486327) -ERC721Test:testFuzzSafeTransferFromWithData(address,address,address,bytes) (runs: 256, μ: 1458168, ~: 1458817) -ERC721Test:testFuzzSetApprovalForAllSuccess(address,address) (runs: 256, μ: 189558, ~: 189558) +ERC721Test:testFuzzSafeMintSuccess(address[]) (runs: 256, μ: 21181593, ~: 20747833) +ERC721Test:testFuzzSafeTransferFromWithData(address,address,address,bytes) (runs: 256, μ: 1457816, ~: 1454213) +ERC721Test:testFuzzSetApprovalForAllSuccess(address,address) (runs: 256, μ: 189633, ~: 189633) ERC721Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15822, ~: 15749) -ERC721Test:testFuzzSetMinterSuccess(string) (runs: 256, μ: 33791, ~: 33791) -ERC721Test:testFuzzTokenByIndex(address,string[]) (runs: 256, μ: 21239474, ~: 21216719) -ERC721Test:testFuzzTotalSupply(address,string[]) (runs: 256, μ: 21066522, ~: 21042774) -ERC721Test:testFuzzTransferFrom(address,address,address) (runs: 256, μ: 568567, ~: 568549) +ERC721Test:testFuzzSetMinterSuccess(string) (runs: 256, μ: 33828, ~: 33828) +ERC721Test:testFuzzTokenByIndex(address,string[]) (runs: 256, μ: 21342536, ~: 21298802) +ERC721Test:testFuzzTotalSupply(address,string[]) (runs: 256, μ: 21168734, ~: 21123850) +ERC721Test:testFuzzTransferFrom(address,address,address) (runs: 256, μ: 568386, ~: 568369) ERC721Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14090, ~: 14090) -ERC721Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75720, ~: 75693) +ERC721Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75721, ~: 75693) ERC721Test:testGetApprovedApprovedTokenId() (gas: 194649) ERC721Test:testGetApprovedInvalidTokenId() (gas: 11097) ERC721Test:testGetApprovedNotApprovedTokenId() (gas: 170887) ERC721Test:testHasOwner() (gas: 12585) -ERC721Test:testInitialSetup() (gas: 2408982) +ERC721Test:testInitialSetup() (gas: 2390885) ERC721Test:testOwnerOf() (gas: 166528) ERC721Test:testOwnerOfInvalidTokenId() (gas: 11052) -ERC721Test:testPermitBadChainId() (gas: 200160) -ERC721Test:testPermitBadNonce() (gas: 197330) -ERC721Test:testPermitExpiredDeadline() (gas: 170692) -ERC721Test:testPermitOtherSignature() (gas: 198207) -ERC721Test:testPermitReplaySignature() (gas: 230573) -ERC721Test:testPermitSuccess() (gas: 226900) +ERC721Test:testPermitBadChainId() (gas: 200137) +ERC721Test:testPermitBadNonce() (gas: 197307) +ERC721Test:testPermitExpiredDeadline() (gas: 170669) +ERC721Test:testPermitOtherSignature() (gas: 198184) +ERC721Test:testPermitReplaySignature() (gas: 230527) +ERC721Test:testPermitSuccess() (gas: 226877) ERC721Test:testRenounceOwnershipNonOwner() (gas: 10944) -ERC721Test:testRenounceOwnershipSuccess() (gas: 22864) +ERC721Test:testRenounceOwnershipSuccess() (gas: 22887) ERC721Test:testSafeMintNonMinter() (gas: 13225) ERC721Test:testSafeMintOverflow() (gas: 15488) -ERC721Test:testSafeMintReceiverContract() (gas: 389374) +ERC721Test:testSafeMintReceiverContract() (gas: 389351) ERC721Test:testSafeMintReceiverContractFunctionNotImplemented() (gas: 116165) ERC721Test:testSafeMintReceiverContractInvalidReturnIdentifier() (gas: 340401) ERC721Test:testSafeMintReceiverContractRevertsWithMessage() (gas: 337695) ERC721Test:testSafeMintReceiverContractRevertsWithPanic() (gas: 337938) ERC721Test:testSafeMintReceiverContractRevertsWithoutMessage() (gas: 337325) -ERC721Test:testSafeMintSuccess() (gas: 526072) +ERC721Test:testSafeMintSuccess() (gas: 526049) ERC721Test:testSafeMintToZeroAddress() (gas: 38430) ERC721Test:testSafeMintTokenAlreadyMinted() (gas: 363393) ERC721Test:testSafeTransferFromNoData() (gas: 1458298) @@ -526,14 +526,14 @@ ERC721Test:testSafeTransferFromReceiverInvalidReturnIdentifier() (gas: 405451) ERC721Test:testSafeTransferFromReceiverRevertsWithMessage() (gas: 402725) ERC721Test:testSafeTransferFromReceiverRevertsWithPanic() (gas: 402991) ERC721Test:testSafeTransferFromReceiverRevertsWithoutMessage() (gas: 402355) -ERC721Test:testSafeTransferFromWithData() (gas: 1215115) -ERC721Test:testSetApprovalForAllOperatorIsOwner() (gas: 167663) -ERC721Test:testSetApprovalForAllSuccessCase1() (gas: 196246) -ERC721Test:testSetApprovalForAllSuccessCase2() (gas: 189489) -ERC721Test:testSetApprovalForAllSuccessCase3() (gas: 202786) +ERC721Test:testSafeTransferFromWithData() (gas: 1215104) +ERC721Test:testSetApprovalForAllOperatorIsOwner() (gas: 167640) +ERC721Test:testSetApprovalForAllSuccessCase1() (gas: 196271) +ERC721Test:testSetApprovalForAllSuccessCase2() (gas: 189564) +ERC721Test:testSetApprovalForAllSuccessCase3() (gas: 202836) ERC721Test:testSetMinterNonOwner() (gas: 12700) ERC721Test:testSetMinterRemoveOwnerAddress() (gas: 13798) -ERC721Test:testSetMinterSuccess() (gas: 33572) +ERC721Test:testSetMinterSuccess() (gas: 33608) ERC721Test:testSetMinterToZeroAddress() (gas: 15752) ERC721Test:testSupportsInterfaceInvalidInterfaceId() (gas: 8567) ERC721Test:testSupportsInterfaceInvalidInterfaceIdGasCost() (gas: 9598) @@ -546,29 +546,29 @@ ERC721Test:testTokenOfOwnerByIndexReverts() (gas: 547900) ERC721Test:testTokenURIAfterBurning() (gas: 138977) ERC721Test:testTokenURIDefault() (gas: 169550) ERC721Test:testTokenURIInvalidTokenId() (gas: 13172) -ERC721Test:testTokenURINoBaseURI() (gas: 2528033) -ERC721Test:testTokenURINoTokenUri() (gas: 126741) -ERC721Test:testTotalSupply() (gas: 329166) -ERC721Test:testTransferFrom() (gas: 578101) +ERC721Test:testTokenURINoBaseURI() (gas: 2509889) +ERC721Test:testTokenURINoTokenUri() (gas: 126744) +ERC721Test:testTotalSupply() (gas: 329143) +ERC721Test:testTransferFrom() (gas: 577921) ERC721Test:testTransferOwnershipNonOwner() (gas: 12612) -ERC721Test:testTransferOwnershipSuccess() (gas: 54052) +ERC721Test:testTransferOwnershipSuccess() (gas: 54098) ERC721Test:testTransferOwnershipToZeroAddress() (gas: 15608) MathTest:testCbrtRoundDown() (gas: 49935) MathTest:testCbrtRoundUp() (gas: 50582) MathTest:testCeilDiv() (gas: 14326) -MathTest:testFuzzCbrt(uint256,bool) (runs: 256, μ: 22248, ~: 21924) +MathTest:testFuzzCbrt(uint256,bool) (runs: 256, μ: 22251, ~: 22052) MathTest:testFuzzCeilDiv(uint256,uint256) (runs: 256, μ: 9672, ~: 9699) MathTest:testFuzzInt256Average(int256,int256) (runs: 256, μ: 8572, ~: 8572) -MathTest:testFuzzLog10(uint256,bool) (runs: 256, μ: 10134, ~: 10152) -MathTest:testFuzzLog2(uint256,bool) (runs: 256, μ: 9979, ~: 9985) -MathTest:testFuzzLog256(uint256,bool) (runs: 256, μ: 10016, ~: 10018) -MathTest:testFuzzMulDiv(uint256,uint256,uint256) (runs: 256, μ: 14145, ~: 13888) -MathTest:testFuzzMulDivDomain(uint256,uint256,uint256) (runs: 256, μ: 10487, ~: 10570) +MathTest:testFuzzLog10(uint256,bool) (runs: 256, μ: 10138, ~: 10152) +MathTest:testFuzzLog2(uint256,bool) (runs: 256, μ: 9977, ~: 9994) +MathTest:testFuzzLog256(uint256,bool) (runs: 256, μ: 10011, ~: 10018) +MathTest:testFuzzMulDiv(uint256,uint256,uint256) (runs: 256, μ: 14141, ~: 13888) +MathTest:testFuzzMulDivDomain(uint256,uint256,uint256) (runs: 256, μ: 10485, ~: 10570) MathTest:testFuzzSignum(int256) (runs: 256, μ: 8464, ~: 8456) MathTest:testFuzzUint256Average(uint256,uint256) (runs: 256, μ: 8635, ~: 8635) -MathTest:testFuzzWadCbrt(uint256) (runs: 256, μ: 22236, ~: 21948) -MathTest:testFuzzWadExp(int256) (runs: 256, μ: 15258, ~: 15363) -MathTest:testFuzzWadLn(int256) (runs: 256, μ: 16752, ~: 16541) +MathTest:testFuzzWadCbrt(uint256) (runs: 256, μ: 22233, ~: 21912) +MathTest:testFuzzWadExp(int256) (runs: 256, μ: 15255, ~: 15363) +MathTest:testFuzzWadLn(int256) (runs: 256, μ: 16743, ~: 16441) MathTest:testInt256Average() (gas: 18313) MathTest:testLog10RoundDown() (gas: 24985) MathTest:testLog10RoundUp() (gas: 26166) @@ -589,18 +589,18 @@ MathTest:testWadExp() (gas: 33776) MathTest:testWadExpOverflow() (gas: 11127) MathTest:testWadLn() (gas: 30882) MathTest:testWadLnNegativeValues() (gas: 11130) -MerkleProofVerificationTest:testFuzzMultiProofVerifySingleLeaf(bytes32[],uint256) (runs: 256, μ: 1649977607, ~: 1649974079) -MerkleProofVerificationTest:testFuzzVerify(bytes32[],uint256) (runs: 256, μ: 135976322, ~: 135972870) -MerkleProofVerificationTest:testFuzzVerifyMultiProofMultipleLeaves(bool,bool,bool) (runs: 256, μ: 412475329, ~: 412475324) -MerkleProofVerificationTest:testInvalidMerkleMultiProof() (gas: 412478774) -MerkleProofVerificationTest:testInvalidMerkleProof() (gas: 33970749) -MerkleProofVerificationTest:testInvalidMerkleProofLength() (gas: 33972916) -MerkleProofVerificationTest:testInvalidMultiProof() (gas: 909636471) -MerkleProofVerificationTest:testMaliciousMultiProofVerify() (gas: 303217500) -MerkleProofVerificationTest:testMultiProofEdgeCase1() (gas: 412460908) -MerkleProofVerificationTest:testMultiProofEdgeCase2() (gas: 412461060) -MerkleProofVerificationTest:testMultiProofVerify() (gas: 412482753) -MerkleProofVerificationTest:testVerify() (gas: 67940109) +MerkleProofVerificationTest:testFuzzMultiProofVerifySingleLeaf(bytes32[],uint256) (runs: 256, μ: 1649984786, ~: 1649981310) +MerkleProofVerificationTest:testFuzzVerify(bytes32[],uint256) (runs: 256, μ: 135978381, ~: 135974981) +MerkleProofVerificationTest:testFuzzVerifyMultiProofMultipleLeaves(bool,bool,bool) (runs: 256, μ: 412477124, ~: 412477119) +MerkleProofVerificationTest:testInvalidMerkleMultiProof() (gas: 412480569) +MerkleProofVerificationTest:testInvalidMerkleProof() (gas: 33971264) +MerkleProofVerificationTest:testInvalidMerkleProofLength() (gas: 33973431) +MerkleProofVerificationTest:testInvalidMultiProof() (gas: 909641088) +MerkleProofVerificationTest:testMaliciousMultiProofVerify() (gas: 303219039) +MerkleProofVerificationTest:testMultiProofEdgeCase1() (gas: 412462703) +MerkleProofVerificationTest:testMultiProofEdgeCase2() (gas: 412462855) +MerkleProofVerificationTest:testMultiProofVerify() (gas: 412484548) +MerkleProofVerificationTest:testVerify() (gas: 67941139) MulticallTest:testMulticallRevert() (gas: 545382964) MulticallTest:testMulticallSelfRevert() (gas: 1090186642) MulticallTest:testMulticallSelfSuccess() (gas: 1635537407) @@ -612,135 +612,135 @@ MulticallTest:testMultistaticcallRevert() (gas: 8937393460525252382) MulticallTest:testMultistaticcallSuccess() (gas: 545354391) Ownable2StepInvariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3840) Ownable2StepInvariants:invariantPendingOwner() (runs: 256, calls: 3840, reverts: 3840) -Ownable2StepTest:testAcceptOwnershipNonPendingOwner() (gas: 47654) -Ownable2StepTest:testAcceptOwnershipSuccess() (gas: 40806) -Ownable2StepTest:testFuzzAcceptOwnershipNonPendingOwner(address) (runs: 256, μ: 46864, ~: 46864) -Ownable2StepTest:testFuzzAcceptOwnershipSuccess(address,address) (runs: 256, μ: 67636, ~: 67608) -Ownable2StepTest:testFuzzPendingOwnerResetAfterRenounceOwnership(address) (runs: 256, μ: 40152, ~: 40135) -Ownable2StepTest:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13954, ~: 13954) -Ownable2StepTest:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 45365, ~: 45348) -Ownable2StepTest:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14106, ~: 14106) -Ownable2StepTest:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 52203, ~: 52203) -Ownable2StepTest:testHasOwner() (gas: 12527) -Ownable2StepTest:testInitialSetup() (gas: 237121) -Ownable2StepTest:testPendingOwnerResetAfterRenounceOwnership() (gas: 41029) -Ownable2StepTest:testRenounceOwnershipNonOwner() (gas: 10941) -Ownable2StepTest:testRenounceOwnershipSuccess() (gas: 20229) -Ownable2StepTest:testTransferOwnershipNonOwner() (gas: 12618) -Ownable2StepTest:testTransferOwnershipSuccess() (gas: 45966) +Ownable2StepTest:testAcceptOwnershipNonPendingOwner() (gas: 47657) +Ownable2StepTest:testAcceptOwnershipSuccess() (gas: 40811) +Ownable2StepTest:testFuzzAcceptOwnershipNonPendingOwner(address) (runs: 256, μ: 46867, ~: 46867) +Ownable2StepTest:testFuzzAcceptOwnershipSuccess(address,address) (runs: 256, μ: 67647, ~: 67618) +Ownable2StepTest:testFuzzPendingOwnerResetAfterRenounceOwnership(address) (runs: 256, μ: 40157, ~: 40140) +Ownable2StepTest:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13955, ~: 13955) +Ownable2StepTest:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 45373, ~: 45356) +Ownable2StepTest:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14107, ~: 14107) +Ownable2StepTest:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 52209, ~: 52209) +Ownable2StepTest:testHasOwner() (gas: 12528) +Ownable2StepTest:testInitialSetup() (gas: 235725) +Ownable2StepTest:testPendingOwnerResetAfterRenounceOwnership() (gas: 41035) +Ownable2StepTest:testRenounceOwnershipNonOwner() (gas: 10942) +Ownable2StepTest:testRenounceOwnershipSuccess() (gas: 20233) +Ownable2StepTest:testTransferOwnershipNonOwner() (gas: 12619) +Ownable2StepTest:testTransferOwnershipSuccess() (gas: 45969) OwnableInvariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3840) -OwnableTest:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13927, ~: 13927) -OwnableTest:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 25251, ~: 25251) -OwnableTest:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14080, ~: 14080) -OwnableTest:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 30275, ~: 30275) -OwnableTest:testHasOwner() (gas: 12524) -OwnableTest:testInitialSetup() (gas: 201574) -OwnableTest:testRenounceOwnershipNonOwner() (gas: 10847) -OwnableTest:testRenounceOwnershipSuccess() (gas: 17974) -OwnableTest:testTransferOwnershipNonOwner() (gas: 12559) -OwnableTest:testTransferOwnershipSuccess() (gas: 22372) -OwnableTest:testTransferOwnershipToZeroAddress() (gas: 15511) -SignatureCheckerTest:testEIP1271NoIsValidSignatureFunction() (gas: 23596) -SignatureCheckerTest:testEIP1271WithInvalidSignature(bytes,string) (runs: 256, μ: 24150, ~: 24147) -SignatureCheckerTest:testEIP1271WithInvalidSignature1() (gas: 34558) -SignatureCheckerTest:testEIP1271WithInvalidSignature2() (gas: 30166) -SignatureCheckerTest:testEIP1271WithInvalidSigner() (gas: 34636) -SignatureCheckerTest:testEIP1271WithMaliciousWallet() (gas: 24529) -SignatureCheckerTest:testEIP1271WithValidSignature() (gas: 34545) -SignatureCheckerTest:testEOAWithInvalidSignature1() (gas: 21073) -SignatureCheckerTest:testEOAWithInvalidSignature2() (gas: 21381) -SignatureCheckerTest:testEOAWithInvalidSigner() (gas: 21165) -SignatureCheckerTest:testEOAWithTooHighSValue() (gas: 18427) -SignatureCheckerTest:testEOAWithValidSignature() (gas: 20290) -SignatureCheckerTest:testFuzzEIP1271WithInvalidSigner(string,string) (runs: 256, μ: 36548, ~: 36614) -SignatureCheckerTest:testFuzzEIP1271WithValidSignature(string) (runs: 256, μ: 35124, ~: 35118) -SignatureCheckerTest:testFuzzEOAWithInvalidSignature(bytes,string) (runs: 256, μ: 17555, ~: 17554) -SignatureCheckerTest:testFuzzEOAWithInvalidSigner(string,string) (runs: 256, μ: 22184, ~: 22245) -SignatureCheckerTest:testFuzzEOAWithValidSignature(string,string) (runs: 256, μ: 21303, ~: 21364) -SignatureCheckerTest:testInitialSetup() (gas: 8292) -TimelockControllerInvariants:invariantExecutedLessThanOrEqualToScheduled() (runs: 256, calls: 3840, reverts: 1282) -TimelockControllerInvariants:invariantExecutedProposalCancellation() (runs: 256, calls: 3840, reverts: 1336) -TimelockControllerInvariants:invariantExecutingCancelledProposal() (runs: 256, calls: 3840, reverts: 1358) -TimelockControllerInvariants:invariantExecutingNotReadyProposal() (runs: 256, calls: 3840, reverts: 1272) -TimelockControllerInvariants:invariantOnceProposalExecution() (runs: 256, calls: 3840, reverts: 1336) -TimelockControllerInvariants:invariantProposalsExecutedMatchCount() (runs: 256, calls: 3840, reverts: 1282) -TimelockControllerInvariants:invariantSumOfProposals() (runs: 256, calls: 3840, reverts: 1282) +OwnableTest:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13928, ~: 13928) +OwnableTest:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 25259, ~: 25259) +OwnableTest:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14081, ~: 14081) +OwnableTest:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 30283, ~: 30283) +OwnableTest:testHasOwner() (gas: 12525) +OwnableTest:testInitialSetup() (gas: 200778) +OwnableTest:testRenounceOwnershipNonOwner() (gas: 10848) +OwnableTest:testRenounceOwnershipSuccess() (gas: 17978) +OwnableTest:testTransferOwnershipNonOwner() (gas: 12560) +OwnableTest:testTransferOwnershipSuccess() (gas: 22376) +OwnableTest:testTransferOwnershipToZeroAddress() (gas: 15512) +SignatureCheckerTest:testEIP1271NoIsValidSignatureFunction() (gas: 23573) +SignatureCheckerTest:testEIP1271WithInvalidSignature(bytes,string) (runs: 256, μ: 24127, ~: 24124) +SignatureCheckerTest:testEIP1271WithInvalidSignature1() (gas: 34535) +SignatureCheckerTest:testEIP1271WithInvalidSignature2() (gas: 30143) +SignatureCheckerTest:testEIP1271WithInvalidSigner() (gas: 34613) +SignatureCheckerTest:testEIP1271WithMaliciousWallet() (gas: 24506) +SignatureCheckerTest:testEIP1271WithValidSignature() (gas: 34522) +SignatureCheckerTest:testEOAWithInvalidSignature1() (gas: 21050) +SignatureCheckerTest:testEOAWithInvalidSignature2() (gas: 21358) +SignatureCheckerTest:testEOAWithInvalidSigner() (gas: 21142) +SignatureCheckerTest:testEOAWithTooHighSValue() (gas: 18404) +SignatureCheckerTest:testEOAWithValidSignature() (gas: 20267) +SignatureCheckerTest:testFuzzEIP1271WithInvalidSigner(string,string) (runs: 256, μ: 36525, ~: 36591) +SignatureCheckerTest:testFuzzEIP1271WithValidSignature(string) (runs: 256, μ: 35101, ~: 35095) +SignatureCheckerTest:testFuzzEOAWithInvalidSignature(bytes,string) (runs: 256, μ: 17532, ~: 17531) +SignatureCheckerTest:testFuzzEOAWithInvalidSigner(string,string) (runs: 256, μ: 22161, ~: 22222) +SignatureCheckerTest:testFuzzEOAWithValidSignature(string,string) (runs: 256, μ: 21280, ~: 21341) +SignatureCheckerTest:testInitialSetup() (gas: 8315) +TimelockControllerInvariants:invariantExecutedLessThanOrEqualToScheduled() (runs: 256, calls: 3840, reverts: 1278) +TimelockControllerInvariants:invariantExecutedProposalCancellation() (runs: 256, calls: 3840, reverts: 1290) +TimelockControllerInvariants:invariantExecutingCancelledProposal() (runs: 256, calls: 3840, reverts: 1339) +TimelockControllerInvariants:invariantExecutingNotReadyProposal() (runs: 256, calls: 3840, reverts: 1273) +TimelockControllerInvariants:invariantOnceProposalExecution() (runs: 256, calls: 3840, reverts: 1302) +TimelockControllerInvariants:invariantProposalsExecutedMatchCount() (runs: 256, calls: 3840, reverts: 1278) +TimelockControllerInvariants:invariantSumOfProposals() (runs: 256, calls: 3840, reverts: 1278) TimelockControllerTest:testAdminCannotBatchExecute() (gas: 750573) TimelockControllerTest:testAdminCannotBatchSchedule() (gas: 748359) TimelockControllerTest:testAdminCannotCancel() (gas: 13280) -TimelockControllerTest:testAdminCannotExecute() (gas: 18372) -TimelockControllerTest:testAdminCannotSchedule() (gas: 16044) -TimelockControllerTest:testBatchCancelFinished() (gas: 4641389) -TimelockControllerTest:testBatchEqualAndGreaterMinimumDelay() (gas: 6145268) -TimelockControllerTest:testBatchHasBeenExecuted() (gas: 4639611) -TimelockControllerTest:testBatchHasNotBeenExecuted() (gas: 3078883) -TimelockControllerTest:testBatchInsufficientDelay() (gas: 1532719) -TimelockControllerTest:testBatchMinimumDelayUpdate() (gas: 3086552) -TimelockControllerTest:testBatchOperationAlreadyScheduled() (gas: 4593355) -TimelockControllerTest:testBatchOperationIsNotReady() (gas: 4598672) -TimelockControllerTest:testBatchPendingIfExecuted() (gas: 4638226) -TimelockControllerTest:testBatchPendingIfNotYetExecuted() (gas: 3078891) -TimelockControllerTest:testBatchPredecessorInvalid() (gas: 4601024) -TimelockControllerTest:testBatchPredecessorMultipleNotExecuted() (gas: 6141708) -TimelockControllerTest:testBatchPredecessorNotExecuted() (gas: 7662979) -TimelockControllerTest:testBatchPredecessorNotScheduled() (gas: 6116884) -TimelockControllerTest:testBatchReadyAfterTheExecutionTime() (gas: 3079456) -TimelockControllerTest:testBatchReadyBeforeTheExecutionTime() (gas: 3079473) -TimelockControllerTest:testBatchReadyOnTheExecutionTime() (gas: 3079359) -TimelockControllerTest:testBatchScheduleAndExecuteWithEmptySalt() (gas: 4647401) -TimelockControllerTest:testBatchScheduleAndExecuteWithNonEmptySalt() (gas: 4650846) -TimelockControllerTest:testBatchTargetRevert() (gas: 9186333) -TimelockControllerTest:testBatchTimestampHasBeenExecuted() (gas: 4638064) -TimelockControllerTest:testBatchTimestampHasNotBeenExecuted() (gas: 3078711) +TimelockControllerTest:testAdminCannotExecute() (gas: 18349) +TimelockControllerTest:testAdminCannotSchedule() (gas: 16021) +TimelockControllerTest:testBatchCancelFinished() (gas: 4641395) +TimelockControllerTest:testBatchEqualAndGreaterMinimumDelay() (gas: 6145274) +TimelockControllerTest:testBatchHasBeenExecuted() (gas: 4639618) +TimelockControllerTest:testBatchHasNotBeenExecuted() (gas: 3078886) +TimelockControllerTest:testBatchInsufficientDelay() (gas: 1532720) +TimelockControllerTest:testBatchMinimumDelayUpdate() (gas: 3086579) +TimelockControllerTest:testBatchOperationAlreadyScheduled() (gas: 4593358) +TimelockControllerTest:testBatchOperationIsNotReady() (gas: 4598675) +TimelockControllerTest:testBatchPendingIfExecuted() (gas: 4638232) +TimelockControllerTest:testBatchPendingIfNotYetExecuted() (gas: 3078894) +TimelockControllerTest:testBatchPredecessorInvalid() (gas: 4601028) +TimelockControllerTest:testBatchPredecessorMultipleNotExecuted() (gas: 6141714) +TimelockControllerTest:testBatchPredecessorNotExecuted() (gas: 7662985) +TimelockControllerTest:testBatchPredecessorNotScheduled() (gas: 6116888) +TimelockControllerTest:testBatchReadyAfterTheExecutionTime() (gas: 3079459) +TimelockControllerTest:testBatchReadyBeforeTheExecutionTime() (gas: 3079476) +TimelockControllerTest:testBatchReadyOnTheExecutionTime() (gas: 3079362) +TimelockControllerTest:testBatchScheduleAndExecuteWithEmptySalt() (gas: 4647416) +TimelockControllerTest:testBatchScheduleAndExecuteWithNonEmptySalt() (gas: 4650861) +TimelockControllerTest:testBatchTargetRevert() (gas: 9186339) +TimelockControllerTest:testBatchTimestampHasBeenExecuted() (gas: 4638070) +TimelockControllerTest:testBatchTimestampHasNotBeenExecuted() (gas: 3078714) TimelockControllerTest:testCanReceiveEther() (gas: 15016) -TimelockControllerTest:testCancellerCanCancelOperation() (gas: 3065173) -TimelockControllerTest:testCompleteOperationWithAssignExecutorRoleToZeroAddress() (gas: 125411) -TimelockControllerTest:testCompletePipelineOperationMinimumDelayUpdate() (gas: 73758) -TimelockControllerTest:testCompletePipelineOperationSetRoleAdmin() (gas: 101204) -TimelockControllerTest:testExecutorCanBatchExecute() (gas: 3049249) -TimelockControllerTest:testExecutorCanExecute() (gas: 29870) +TimelockControllerTest:testCancellerCanCancelOperation() (gas: 3065178) +TimelockControllerTest:testCompleteOperationWithAssignExecutorRoleToZeroAddress() (gas: 125324) +TimelockControllerTest:testCompletePipelineOperationMinimumDelayUpdate() (gas: 73717) +TimelockControllerTest:testCompletePipelineOperationSetRoleAdmin() (gas: 101140) +TimelockControllerTest:testExecutorCanBatchExecute() (gas: 3049251) +TimelockControllerTest:testExecutorCanExecute() (gas: 29826) TimelockControllerTest:testExecutorCannotBatchSchedule() (gas: 1485375) TimelockControllerTest:testExecutorCannotCancel() (gas: 15281) -TimelockControllerTest:testExecutorCannotSchedule() (gas: 19023) -TimelockControllerTest:testFuzzBatchValue(uint256) (runs: 256, μ: 4653431, ~: 4653583) -TimelockControllerTest:testFuzzHashOperation(address,uint256,bytes,bytes32,bytes32) (runs: 256, μ: 11107, ~: 10990) +TimelockControllerTest:testExecutorCannotSchedule() (gas: 18977) +TimelockControllerTest:testFuzzBatchValue(uint256) (runs: 256, μ: 4653469, ~: 4653589) +TimelockControllerTest:testFuzzHashOperation(address,uint256,bytes,bytes32,bytes32) (runs: 256, μ: 11084, ~: 10967) TimelockControllerTest:testFuzzHashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32) (runs: 256, μ: 1880733, ~: 1890407) -TimelockControllerTest:testFuzzOperationValue(uint256) (runs: 256, μ: 113852, ~: 114011) -TimelockControllerTest:testHandleERC1155() (gas: 41507913) -TimelockControllerTest:testHandleERC721() (gas: 7058093) -TimelockControllerTest:testHashOperation() (gas: 13112) +TimelockControllerTest:testFuzzOperationValue(uint256) (runs: 256, μ: 113815, ~: 113948) +TimelockControllerTest:testHandleERC1155() (gas: 41494156) +TimelockControllerTest:testHandleERC721() (gas: 7039956) +TimelockControllerTest:testHashOperation() (gas: 13089) TimelockControllerTest:testHashOperationBatch() (gas: 1526310) -TimelockControllerTest:testInitialSetup() (gas: 4274954) -TimelockControllerTest:testInvalidOperation() (gas: 10718) -TimelockControllerTest:testOperationAlreadyScheduled() (gas: 52329) -TimelockControllerTest:testOperationCancelFinished() (gas: 101902) -TimelockControllerTest:testOperationEqualAndGreaterMinimumDelay() (gas: 90758) -TimelockControllerTest:testOperationHasBeenExecuted() (gas: 100157) -TimelockControllerTest:testOperationHasNotBeenExecuted() (gas: 52730) -TimelockControllerTest:testOperationInsufficientDelay() (gas: 19456) -TimelockControllerTest:testOperationMinimumDelayUpdate() (gas: 61739) -TimelockControllerTest:testOperationOperationIsNotReady() (gas: 57684) -TimelockControllerTest:testOperationPendingIfExecuted() (gas: 98728) -TimelockControllerTest:testOperationPendingIfNotYetExecuted() (gas: 52794) -TimelockControllerTest:testOperationPredecessorInvalid() (gas: 62863) -TimelockControllerTest:testOperationPredecessorMultipleNotExecuted() (gas: 92521) -TimelockControllerTest:testOperationPredecessorNotExecuted() (gas: 99305) -TimelockControllerTest:testOperationPredecessorNotScheduled() (gas: 66765) -TimelockControllerTest:testOperationReadyAfterTheExecutionTime() (gas: 53349) -TimelockControllerTest:testOperationReadyBeforeTheExecutionTime() (gas: 53292) -TimelockControllerTest:testOperationReadyOnTheExecutionTime() (gas: 53186) -TimelockControllerTest:testOperationTargetRevert() (gas: 110186) -TimelockControllerTest:testOperationTimestampHasBeenExecuted() (gas: 98502) -TimelockControllerTest:testOperationTimestampHasNotBeenExecuted() (gas: 52581) -TimelockControllerTest:testProposerCanBatchSchedule() (gas: 3088645) -TimelockControllerTest:testProposerCanCancel() (gas: 20179) -TimelockControllerTest:testProposerCanSchedule() (gas: 75609) +TimelockControllerTest:testInitialSetup() (gas: 4238968) +TimelockControllerTest:testInvalidOperation() (gas: 10719) +TimelockControllerTest:testOperationAlreadyScheduled() (gas: 52263) +TimelockControllerTest:testOperationCancelFinished() (gas: 101839) +TimelockControllerTest:testOperationEqualAndGreaterMinimumDelay() (gas: 90672) +TimelockControllerTest:testOperationHasBeenExecuted() (gas: 100095) +TimelockControllerTest:testOperationHasNotBeenExecuted() (gas: 52687) +TimelockControllerTest:testOperationInsufficientDelay() (gas: 19434) +TimelockControllerTest:testOperationMinimumDelayUpdate() (gas: 61720) +TimelockControllerTest:testOperationOperationIsNotReady() (gas: 57618) +TimelockControllerTest:testOperationPendingIfExecuted() (gas: 98665) +TimelockControllerTest:testOperationPendingIfNotYetExecuted() (gas: 52751) +TimelockControllerTest:testOperationPredecessorInvalid() (gas: 62798) +TimelockControllerTest:testOperationPredecessorMultipleNotExecuted() (gas: 92435) +TimelockControllerTest:testOperationPredecessorNotExecuted() (gas: 99196) +TimelockControllerTest:testOperationPredecessorNotScheduled() (gas: 66677) +TimelockControllerTest:testOperationReadyAfterTheExecutionTime() (gas: 53306) +TimelockControllerTest:testOperationReadyBeforeTheExecutionTime() (gas: 53249) +TimelockControllerTest:testOperationReadyOnTheExecutionTime() (gas: 53143) +TimelockControllerTest:testOperationTargetRevert() (gas: 110054) +TimelockControllerTest:testOperationTimestampHasBeenExecuted() (gas: 98439) +TimelockControllerTest:testOperationTimestampHasNotBeenExecuted() (gas: 52538) +TimelockControllerTest:testProposerCanBatchSchedule() (gas: 3088649) +TimelockControllerTest:testProposerCanCancel() (gas: 20181) +TimelockControllerTest:testProposerCanSchedule() (gas: 75567) TimelockControllerTest:testProposerCannotBatchExecute() (gas: 1489786) -TimelockControllerTest:testProposerCannotExecute() (gas: 23549) -TimelockControllerTest:testReturnsLaterMinimumDelayForCalls() (gas: 20711) -TimelockControllerTest:testRevertWhenNotTimelock() (gas: 9053) -TimelockControllerTest:testScheduleAndExecuteWithEmptySalt() (gas: 107956) -TimelockControllerTest:testScheduleAndExecuteWithNonEmptySalt() (gas: 111313) +TimelockControllerTest:testProposerCannotExecute() (gas: 23503) +TimelockControllerTest:testReturnsLaterMinimumDelayForCalls() (gas: 20780) +TimelockControllerTest:testRevertWhenNotTimelock() (gas: 9030) +TimelockControllerTest:testScheduleAndExecuteWithEmptySalt() (gas: 107902) +TimelockControllerTest:testScheduleAndExecuteWithNonEmptySalt() (gas: 111259) TimelockControllerTest:testStrangerCannotBatchExecute() (gas: 748592) TimelockControllerTest:testStrangerCannotBatchSchedule() (gas: 746399) TimelockControllerTest:testStrangerCannotCancel() (gas: 11276) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de9b9ba..2fa9517d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## [`0.1.0`](https://github.com/pcaversaccio/snekmate/releases/tag/v0.0.1) (Unreleased) +### ♻️ Refactoring + +- **Authentication** + - [`AccessControl`](https://github.com/pcaversaccio/snekmate/blob/v0.1.0/src/snekmate/auth/AccessControl.vy): Make `AccessControl` module-compliant. ([#216](https://github.com/pcaversaccio/snekmate/pull/216)) + ### 👀 Full Changelog - [`v0.0.5...v0.1.0`](https://github.com/pcaversaccio/snekmate/compare/v0.0.5...v0.1.0) diff --git a/GUIDELINES.md b/GUIDELINES.md index 6137574b..8f6ca2c8 100644 --- a/GUIDELINES.md +++ b/GUIDELINES.md @@ -14,7 +14,7 @@ Any addition or change to the code must be accompanied by relevant and comprehen The test suite should run automatically for each change in the repository, and for pull requests, the tests must succeed before merging. -Please consider writing [Foundry](https://github.com/foundry-rs/foundry)-based unit tests, property-based tests (i.e. fuzzing), and invariant tests for all contracts, if applicable. +Please consider writing [Foundry](https://github.com/foundry-rs/foundry)-based unit tests, property-based tests (i.e. stateless fuzzing), and invariant tests (i.e. stateful fuzzing) for all contracts, if applicable. ## 🪅 Code Style @@ -71,7 +71,9 @@ def _as_singleton_array(element: uint256) -> DynArray[uint256, 1]: - All functions should be provided with full [NatSpec](https://docs.vyperlang.org/en/latest/natspec.html) comments containing the tags `@dev`, `@notice` (if applicable), `@param` for each function parameter, and `@return` if a return statement is present. - Please note the following order of layout: - Version pragma statement - - Interface imports + - Vyper built-in interface imports + - Custom interface imports + - Module imports - `public` constants - `internal` constants - `public` immutables diff --git a/README.md b/README.md index 9800f547..8b714cbd 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ pnpm add --save-dev snekmate ## 👩🏼‍⚖️ Tests -This repository contains [Foundry](https://github.com/foundry-rs/foundry)-based unit tests, property-based tests (i.e. fuzzing), and invariant tests for all contracts, if applicable. All tests are run as part of the CI pipeline [`test-contracts`](./.github/workflows/test-contracts.yml). +This repository contains [Foundry](https://github.com/foundry-rs/foundry)-based unit tests, property-based tests (i.e. stateless fuzzing), and invariant tests (i.e. stateful fuzzing) for all contracts, if applicable. All tests are run as part of the CI pipeline [`test-contracts`](./.github/workflows/test-contracts.yml). > [!NOTE] > An _invariant_ is a property of a program that should always hold true. Fuzzing is a way of checking whether the invariant is falsifiable. diff --git a/src/snekmate/auth/mocks/AccessControlMock.vy b/src/snekmate/auth/mocks/AccessControlMock.vy index 53a97660..d980eb75 100644 --- a/src/snekmate/auth/mocks/AccessControlMock.vy +++ b/src/snekmate/auth/mocks/AccessControlMock.vy @@ -1,17 +1,12 @@ # pragma version ~=0.4.0b5 """ -@title Wrapper Contract for Multi-Role-Based Access Control Functions +@title AccessControl Module Reference Implementation @custom:contract-name AccessControlMock @license GNU Affero General Public License v3.0 only @author pcaversaccio """ -# @dev We import and initialise the `AccessControl` module. -from .. import AccessControl as ac -initializes: ac - - # @dev We import and implement the `IERC165` interface, # which is a built-in interface of the Vyper compiler. from ethereum.ercs import IERC165 @@ -25,6 +20,11 @@ from ..interfaces import IAccessControl implements: IAccessControl +# @dev We import and initialise the `AccessControl` module. +from .. import AccessControl as ac +initializes: ac + + # @dev An additional 32-byte access role. ADDITIONAL_ROLE_1: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_1") @@ -33,9 +33,14 @@ ADDITIONAL_ROLE_1: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_1") ADDITIONAL_ROLE_2: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_2") -# @dev We export all public functions from the `AccessControl` module. -# @notice It's important to also export public `immutable` and state -# variables. +# @dev We export (i.e. the runtime bytecode exposes these +# functions externally, allowing them to be called using +# the ABI encoding specification) all `external` functions +# from the `AccessControl` module. +# @notice Please note that you must always also export (if +# required by the contract logic) `public` declared `constant`, +# `immutable`, and state variables, for which Vyper automatically +# generates an `external` getter function for the variable. exports: ( ac.supportsInterface, ac.DEFAULT_ADMIN_ROLE, @@ -44,7 +49,7 @@ exports: ( ac.grantRole, ac.revokeRole, ac.renounceRole, - ac.set_role_admin + ac.set_role_admin, ) @@ -58,6 +63,8 @@ def __init__(): @notice All predefined roles will be assigned to the `msg.sender`. """ - ac.__init__() # Assigns the `DEFAULT_ADMIN_ROLE` to the `msg.sender`. + # The following line assigns the `DEFAULT_ADMIN_ROLE` + # to the `msg.sender`. + ac.__init__() ac._grant_role(ADDITIONAL_ROLE_1, msg.sender) ac._grant_role(ADDITIONAL_ROLE_2, msg.sender) diff --git a/test/auth/AccessControl.t.sol b/test/auth/AccessControl.t.sol index f121ac6b..a10c0559 100644 --- a/test/auth/AccessControl.t.sol +++ b/test/auth/AccessControl.t.sol @@ -651,7 +651,10 @@ contract AccessControlInvariants is Test { function setUp() public { accessControl = IAccessControlExtended( - vyperDeployer.deployContract("src/snekmate/auth/", "AccessControl") + vyperDeployer.deployContract( + "src/snekmate/auth/mocks/", + "AccessControlMock" + ) ); accessControlHandler = new AccessControlHandler( accessControl, @@ -663,7 +666,7 @@ contract AccessControlInvariants is Test { targetContract(address(accessControlHandler)); } - function invariantHasRole() public view { + function statefulFuzzHasRole() public view { assertEq( accessControl.hasRole(DEFAULT_ADMIN_ROLE, deployer), accessControlHandler.hasRole(DEFAULT_ADMIN_ROLE, deployer) @@ -678,7 +681,7 @@ contract AccessControlInvariants is Test { ); } - function invariantGetRoleAdmin() public view { + function statefulFuzzGetRoleAdmin() public view { assertEq( accessControl.getRoleAdmin(DEFAULT_ADMIN_ROLE), accessControlHandler.getRoleAdmin(DEFAULT_ADMIN_ROLE) From c2f0105002cbe12a2d6d96e11c6c129e1562f666 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Wed, 20 Mar 2024 17:16:46 +0100 Subject: [PATCH 4/8] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20CHANGELOG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fa9517d..fda505a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### ♻️ Refactoring - **Authentication** - - [`AccessControl`](https://github.com/pcaversaccio/snekmate/blob/v0.1.0/src/snekmate/auth/AccessControl.vy): Make `AccessControl` module-compliant. ([#216](https://github.com/pcaversaccio/snekmate/pull/216)) + - [`AccessControl`](https://github.com/pcaversaccio/snekmate/blob/v0.1.0/src/snekmate/auth/AccessControl.vy): Make `AccessControl` module-friendly. ([#216](https://github.com/pcaversaccio/snekmate/pull/216)) ### 👀 Full Changelog From 72f0884ba8cc5598b180461da1cd793986490dfb Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Mon, 25 Mar 2024 09:37:17 +0100 Subject: [PATCH 5/8] =?UTF-8?q?=F0=9F=93=96=20Amend=20Wording?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- src/snekmate/auth/AccessControl.vy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snekmate/auth/AccessControl.vy b/src/snekmate/auth/AccessControl.vy index 57b984f3..a7f5c125 100644 --- a/src/snekmate/auth/AccessControl.vy +++ b/src/snekmate/auth/AccessControl.vy @@ -127,8 +127,8 @@ def __init__(): @dev To omit the opcodes for checking the `msg.value` in the creation-time EVM bytecode, the constructor is declared as `payable`. - @notice All predefined roles will be assigned to - the `msg.sender`. + @notice The `DEFAULT_ADMIN_ROLE` role will be assigned + to the `msg.sender`. """ self._grant_role(DEFAULT_ADMIN_ROLE, msg.sender) From 2c35cecf434bec9a884d402253f275113abee0c7 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Mon, 25 Mar 2024 15:21:25 +0100 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=93=96=20Formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- .gas-snapshot | 282 ++++++++++++++--------------- src/snekmate/auth/AccessControl.vy | 4 +- 2 files changed, 143 insertions(+), 143 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index 476095f4..dfc8ad6c 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -48,8 +48,8 @@ Base64Test:testEncodeSingleCharacter() (gas: 65647) Base64Test:testEncodeWithDoublePadding() (gas: 71290) Base64Test:testEncodeWithNoPadding() (gas: 70021) Base64Test:testEncodeWithSinglePadding() (gas: 71393) -BatchDistributorInvariants:invariantNoEtherBalance() (runs: 256, calls: 3840, reverts: 3827) -BatchDistributorInvariants:invariantNoTokenBalance() (runs: 256, calls: 3840, reverts: 3827) +BatchDistributorInvariants:invariantNoEtherBalance() (runs: 256, calls: 3840, reverts: 3825) +BatchDistributorInvariants:invariantNoTokenBalance() (runs: 256, calls: 3840, reverts: 3825) BatchDistributorTest:testDistributeEtherMultipleAddressesSuccess() (gas: 153468) BatchDistributorTest:testDistributeEtherOneAddressSuccess() (gas: 79162) BatchDistributorTest:testDistributeEtherRevertWithInsufficientFunds() (gas: 83137) @@ -60,8 +60,8 @@ BatchDistributorTest:testDistributeTokenMultipleAddressesSuccess() (gas: 617661) BatchDistributorTest:testDistributeTokenOneAddressSuccess() (gas: 579248) BatchDistributorTest:testDistributeTokenRevertWithInsufficientAllowance() (gas: 574620) BatchDistributorTest:testDistributeTokenRevertWithInsufficientBalance() (gas: 575406) -BatchDistributorTest:testFuzzDistributeEtherMultipleAddressesSuccess(((address,uint256)[]),uint256) (runs: 256, μ: 1853400, ~: 1848050) -BatchDistributorTest:testFuzzDistributeTokenMultipleAddressesSuccess(((address,uint256)[]),address,uint256) (runs: 256, μ: 1347807, ~: 1342138) +BatchDistributorTest:testFuzzDistributeEtherMultipleAddressesSuccess(((address,uint256)[]),uint256) (runs: 256, μ: 1784063, ~: 1658219) +BatchDistributorTest:testFuzzDistributeTokenMultipleAddressesSuccess(((address,uint256)[]),address,uint256) (runs: 256, μ: 1321254, ~: 1295314) Create2AddressTest:testComputeAddress() (gas: 550587) Create2AddressTest:testComputeAddressSelf() (gas: 559227) Create2AddressTest:testFuzzComputeAddress(bytes32,address) (runs: 256, μ: 551182, ~: 551182) @@ -87,33 +87,33 @@ CreateAddressTest:testComputeAddressSelfNonceUint56() (gas: 539914) CreateAddressTest:testComputeAddressSelfNonceUint64() (gas: 540031) CreateAddressTest:testComputeAddressSelfNonceUint8() (gas: 539637) CreateAddressTest:testComputeAddressSelfRevertTooHighNonce() (gas: 8836) -CreateAddressTest:testFuzzComputeAddressNonce0x7f(uint64,address) (runs: 256, μ: 538283, ~: 538390) -CreateAddressTest:testFuzzComputeAddressNonceUint16(uint64,address) (runs: 256, μ: 537715, ~: 537855) -CreateAddressTest:testFuzzComputeAddressNonceUint24(uint64,address) (runs: 256, μ: 537858, ~: 537981) -CreateAddressTest:testFuzzComputeAddressNonceUint32(uint64,address) (runs: 256, μ: 537885, ~: 537988) -CreateAddressTest:testFuzzComputeAddressNonceUint40(uint64,address) (runs: 256, μ: 537985, ~: 538080) -CreateAddressTest:testFuzzComputeAddressNonceUint48(uint64,address) (runs: 256, μ: 537969, ~: 538064) -CreateAddressTest:testFuzzComputeAddressNonceUint56(uint64,address) (runs: 256, μ: 538008, ~: 538093) -CreateAddressTest:testFuzzComputeAddressNonceUint64(uint64,address) (runs: 256, μ: 538004, ~: 538197) -CreateAddressTest:testFuzzComputeAddressNonceUint8(uint64,address) (runs: 256, μ: 537775, ~: 537855) -CreateAddressTest:testFuzzComputeAddressRevertTooHighNonce(uint256,address) (runs: 256, μ: 12906, ~: 12848) -CreateAddressTest:testFuzzComputeAddressSelfNonce0x7f(uint64) (runs: 256, μ: 544451, ~: 544579) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint16(uint64) (runs: 256, μ: 543713, ~: 543868) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint24(uint64) (runs: 256, μ: 543971, ~: 544069) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint32(uint64) (runs: 256, μ: 544071, ~: 544165) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint40(uint64) (runs: 256, μ: 544061, ~: 544149) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint48(uint64) (runs: 256, μ: 544111, ~: 544223) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint56(uint64) (runs: 256, μ: 544204, ~: 544293) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint64(uint64) (runs: 256, μ: 544264, ~: 544423) -CreateAddressTest:testFuzzComputeAddressSelfNonceUint8(uint64) (runs: 256, μ: 543773, ~: 543860) -CreateAddressTest:testFuzzComputeAddressSelfRevertTooHighNonce(uint256) (runs: 256, μ: 12721, ~: 12684) +CreateAddressTest:testFuzzComputeAddressNonce0x7f(uint64,address) (runs: 256, μ: 538237, ~: 538390) +CreateAddressTest:testFuzzComputeAddressNonceUint16(uint64,address) (runs: 256, μ: 537734, ~: 537855) +CreateAddressTest:testFuzzComputeAddressNonceUint24(uint64,address) (runs: 256, μ: 537873, ~: 537981) +CreateAddressTest:testFuzzComputeAddressNonceUint32(uint64,address) (runs: 256, μ: 537854, ~: 537988) +CreateAddressTest:testFuzzComputeAddressNonceUint40(uint64,address) (runs: 256, μ: 537981, ~: 538080) +CreateAddressTest:testFuzzComputeAddressNonceUint48(uint64,address) (runs: 256, μ: 537962, ~: 538064) +CreateAddressTest:testFuzzComputeAddressNonceUint56(uint64,address) (runs: 256, μ: 537983, ~: 538093) +CreateAddressTest:testFuzzComputeAddressNonceUint64(uint64,address) (runs: 256, μ: 537980, ~: 538197) +CreateAddressTest:testFuzzComputeAddressNonceUint8(uint64,address) (runs: 256, μ: 537752, ~: 537855) +CreateAddressTest:testFuzzComputeAddressRevertTooHighNonce(uint256,address) (runs: 256, μ: 12891, ~: 12848) +CreateAddressTest:testFuzzComputeAddressSelfNonce0x7f(uint64) (runs: 256, μ: 544477, ~: 544579) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint16(uint64) (runs: 256, μ: 543693, ~: 543615) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint24(uint64) (runs: 256, μ: 543977, ~: 544069) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint32(uint64) (runs: 256, μ: 544059, ~: 544165) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint40(uint64) (runs: 256, μ: 544067, ~: 544149) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint48(uint64) (runs: 256, μ: 544114, ~: 544223) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint56(uint64) (runs: 256, μ: 544203, ~: 544293) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint64(uint64) (runs: 256, μ: 544266, ~: 544423) +CreateAddressTest:testFuzzComputeAddressSelfNonceUint8(uint64) (runs: 256, μ: 543784, ~: 543860) +CreateAddressTest:testFuzzComputeAddressSelfRevertTooHighNonce(uint256) (runs: 256, μ: 12724, ~: 12684) ECDSATest:testEthSignedMessageHash() (gas: 8735) ECDSATest:testFuzzEthSignedMessageHash(string) (runs: 256, μ: 9321, ~: 9315) ECDSATest:testFuzzRecoverWithInvalidSignature(bytes,string) (runs: 256, μ: 15516, ~: 15518) ECDSATest:testFuzzRecoverWithTooLongSignature(bytes,string) (runs: 256, μ: 13999, ~: 14002) ECDSATest:testFuzzRecoverWithValidSignature(string,string) (runs: 256, μ: 22416, ~: 22477) -ECDSATest:testFuzzRecoverWithWrongMessage(string,string,bytes32) (runs: 256, μ: 22435, ~: 22381) -ECDSATest:testFuzzToDataWithIntendedValidatorHash(address,bytes) (runs: 256, μ: 10187, ~: 10173) +ECDSATest:testFuzzRecoverWithWrongMessage(string,string,bytes32) (runs: 256, μ: 22437, ~: 22493) +ECDSATest:testFuzzToDataWithIntendedValidatorHash(address,bytes) (runs: 256, μ: 10188, ~: 10173) ECDSATest:testFuzzToDataWithIntendedValidatorHashSelf(bytes) (runs: 256, μ: 12216, ~: 12199) ECDSATest:testFuzzToTypedDataHash(string,string) (runs: 256, μ: 9939, ~: 9940) ECDSATest:testRecoverWith0x00Value() (gas: 15622) @@ -132,11 +132,11 @@ ECDSATest:testToTypedDataHash() (gas: 8826) EIP712DomainSeparatorTest:testCachedDomainSeparatorV4() (gas: 10440) EIP712DomainSeparatorTest:testDomainSeparatorV4() (gas: 11715) EIP712DomainSeparatorTest:testEIP712Domain() (gas: 18648) -EIP712DomainSeparatorTest:testFuzzDomainSeparatorV4(uint8) (runs: 256, μ: 11868, ~: 11890) -EIP712DomainSeparatorTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22003, ~: 21965) +EIP712DomainSeparatorTest:testFuzzDomainSeparatorV4(uint8) (runs: 256, μ: 11870, ~: 11890) +EIP712DomainSeparatorTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22030, ~: 22034) EIP712DomainSeparatorTest:testFuzzHashTypedDataV4(address,address,uint256,uint256,uint64) (runs: 256, μ: 10577, ~: 10577) EIP712DomainSeparatorTest:testHashTypedDataV4() (gas: 13523) -ERC1155Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3437) +ERC1155Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3429) ERC1155Test:testBalanceOfBatchCase1() (gas: 281340) ERC1155Test:testBalanceOfBatchCase2() (gas: 235910) ERC1155Test:testBalanceOfBatchCase3() (gas: 38322) @@ -163,37 +163,37 @@ ERC1155Test:testExistsAfterBatchMint() (gas: 143983) ERC1155Test:testExistsAfterSingleBurn() (gas: 138439) ERC1155Test:testExistsAfterSingleMint() (gas: 119687) ERC1155Test:testExistsBeforeMint() (gas: 10481) -ERC1155Test:testFuzzBurnBatchSuccess(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 133529, ~: 133544) +ERC1155Test:testFuzzBurnBatchSuccess(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 133538, ~: 133544) ERC1155Test:testFuzzBurnSuccess(address,address,uint256) (runs: 256, μ: 141208, ~: 141218) ERC1155Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13977, ~: 13977) ERC1155Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48746, ~: 48730) -ERC1155Test:testFuzzSafeBatchTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 227427, ~: 227398) -ERC1155Test:testFuzzSafeBatchTransferFromEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 191804, ~: 191771) +ERC1155Test:testFuzzSafeBatchTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 227426, ~: 227398) +ERC1155Test:testFuzzSafeBatchTransferFromEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 191806, ~: 191771) ERC1155Test:testFuzzSafeBatchTransferFromNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 565631, ~: 565631) -ERC1155Test:testFuzzSafeBatchTransferFromWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 566227, ~: 565788) -ERC1155Test:testFuzzSafeMintBatchEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 153756, ~: 153735) -ERC1155Test:testFuzzSafeMintBatchNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521454, ~: 521464) +ERC1155Test:testFuzzSafeBatchTransferFromWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 566202, ~: 565788) +ERC1155Test:testFuzzSafeMintBatchEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 153733, ~: 153735) +ERC1155Test:testFuzzSafeMintBatchNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521444, ~: 521464) ERC1155Test:testFuzzSafeMintBatchNonMinter(address) (runs: 256, μ: 40926, ~: 40926) -ERC1155Test:testFuzzSafeMintBatchWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521787, ~: 521579) -ERC1155Test:testFuzzSafeMintEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 152776, ~: 152741) -ERC1155Test:testFuzzSafeMintNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521590, ~: 521600) +ERC1155Test:testFuzzSafeMintBatchWithData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521783, ~: 521579) +ERC1155Test:testFuzzSafeMintEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 152769, ~: 152741) +ERC1155Test:testFuzzSafeMintNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 521580, ~: 521600) ERC1155Test:testFuzzSafeMintNonMinter(address) (runs: 256, μ: 33086, ~: 33086) -ERC1155Test:testFuzzSafeMintWithData(address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 522877, ~: 522470) -ERC1155Test:testFuzzSafeTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 206399, ~: 206361) +ERC1155Test:testFuzzSafeMintWithData(address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 522904, ~: 522470) +ERC1155Test:testFuzzSafeTransferFromByApprovedOperator(address,address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 206398, ~: 206361) ERC1155Test:testFuzzSafeTransferFromEOAReceiver(address,address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 170863, ~: 170821) -ERC1155Test:testFuzzSafeTransferFromNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 610019, ~: 610029) -ERC1155Test:testFuzzSafeTransferFromWithData(address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 612011, ~: 611291) -ERC1155Test:testFuzzSetApprovalForAllRevoke(address,address) (runs: 256, μ: 31972, ~: 31943) +ERC1155Test:testFuzzSafeTransferFromNoData(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 610029, ~: 610029) +ERC1155Test:testFuzzSafeTransferFromWithData(address,uint256,uint256,uint256,uint256,bytes) (runs: 256, μ: 612089, ~: 611291) +ERC1155Test:testFuzzSetApprovalForAllRevoke(address,address) (runs: 256, μ: 31974, ~: 31945) ERC1155Test:testFuzzSetApprovalForAllSuccess(address,address) (runs: 256, μ: 45332, ~: 45332) -ERC1155Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15772, ~: 15699) +ERC1155Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15773, ~: 15772) ERC1155Test:testFuzzSetMinterSuccess(string) (runs: 256, μ: 33755, ~: 33755) ERC1155Test:testFuzzSetUriNonMinter(address) (runs: 256, μ: 14455, ~: 14455) -ERC1155Test:testFuzzTotalSupplyAfterBatchBurn(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 126978, ~: 126994) -ERC1155Test:testFuzzTotalSupplyAfterBatchMint(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 141766, ~: 141830) -ERC1155Test:testFuzzTotalSupplyAfterSingleBurn(address,uint256,bytes) (runs: 256, μ: 138383, ~: 138353) -ERC1155Test:testFuzzTotalSupplyAfterSingleMint(uint256,uint256,bytes) (runs: 256, μ: 94797, ~: 120185) +ERC1155Test:testFuzzTotalSupplyAfterBatchBurn(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 126988, ~: 126993) +ERC1155Test:testFuzzTotalSupplyAfterBatchMint(address,uint256,uint256,uint256,uint256) (runs: 256, μ: 141752, ~: 141697) +ERC1155Test:testFuzzTotalSupplyAfterSingleBurn(address,uint256,bytes) (runs: 256, μ: 138381, ~: 138353) +ERC1155Test:testFuzzTotalSupplyAfterSingleMint(uint256,uint256,bytes) (runs: 256, μ: 89667, ~: 60593) ERC1155Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14086, ~: 14086) -ERC1155Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75732, ~: 75704) +ERC1155Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75733, ~: 75706) ERC1155Test:testHasOwner() (gas: 12615) ERC1155Test:testInitialSetup() (gas: 2799169) ERC1155Test:testRenounceOwnershipNonOwner() (gas: 10918) @@ -266,8 +266,8 @@ ERC1155Test:testUriBaseAndTokenUriNotSet() (gas: 2754895) ERC1155Test:testUriBaseAndTokenUriSet() (gas: 65810) ERC1155Test:testUriNoBaseURI() (gas: 2804957) ERC1155Test:testUriNoTokenUri() (gas: 20507) -ERC20Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3393) -ERC20Invariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3393) +ERC20Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3387) +ERC20Invariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3387) ERC20Test:testApproveExceedingBalanceCase1() (gas: 40968) ERC20Test:testApproveExceedingBalanceCase2() (gas: 47974) ERC20Test:testApproveFromZeroAddress() (gas: 13220) @@ -289,27 +289,27 @@ ERC20Test:testBurnSuccessCase2() (gas: 31362) ERC20Test:testCachedDomainSeparator() (gas: 10588) ERC20Test:testDomainSeparator() (gas: 11838) ERC20Test:testEIP712Domain() (gas: 18802) -ERC20Test:testFuzzApproveSuccess(address,uint256) (runs: 256, μ: 39944, ~: 41188) -ERC20Test:testFuzzBurnFromInsufficientAllowance(address,uint256,uint8) (runs: 256, μ: 207344, ~: 207399) -ERC20Test:testFuzzBurnFromSuccess(address,uint256) (runs: 256, μ: 340569, ~: 341736) +ERC20Test:testFuzzApproveSuccess(address,uint256) (runs: 256, μ: 40332, ~: 41188) +ERC20Test:testFuzzBurnFromInsufficientAllowance(address,uint256,uint8) (runs: 256, μ: 207267, ~: 207396) +ERC20Test:testFuzzBurnFromSuccess(address,uint256) (runs: 256, μ: 340861, ~: 341736) ERC20Test:testFuzzBurnInvalidAmount(address,uint256) (runs: 256, μ: 16455, ~: 16455) -ERC20Test:testFuzzBurnSuccessCase(uint256) (runs: 256, μ: 316128, ~: 315927) -ERC20Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12054, ~: 12074) -ERC20Test:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22257, ~: 22218) +ERC20Test:testFuzzBurnSuccessCase(uint256) (runs: 256, μ: 316122, ~: 315924) +ERC20Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12051, ~: 12074) +ERC20Test:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22283, ~: 22287) ERC20Test:testFuzzMintNonMinter(string,uint256) (runs: 256, μ: 13152, ~: 13080) -ERC20Test:testFuzzMintSuccess(string,uint256) (runs: 256, μ: 54864, ~: 55936) +ERC20Test:testFuzzMintSuccess(string,uint256) (runs: 256, μ: 54789, ~: 55936) ERC20Test:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 45302, ~: 45300) ERC20Test:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 71106, ~: 71102) ERC20Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13956, ~: 13956) -ERC20Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48657, ~: 48640) -ERC20Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15777, ~: 15704) +ERC20Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48655, ~: 48640) +ERC20Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15778, ~: 15777) ERC20Test:testFuzzSetMinterSuccess(string) (runs: 256, μ: 33773, ~: 33772) -ERC20Test:testFuzzTransferFromInsufficientAllowance(address,address,uint256,uint8) (runs: 256, μ: 205629, ~: 205907) -ERC20Test:testFuzzTransferFromSuccess(address,address,uint256) (runs: 256, μ: 233550, ~: 235790) +ERC20Test:testFuzzTransferFromInsufficientAllowance(address,address,uint256,uint8) (runs: 256, μ: 205500, ~: 205907) +ERC20Test:testFuzzTransferFromSuccess(address,address,uint256) (runs: 256, μ: 234414, ~: 235496) ERC20Test:testFuzzTransferInvalidAmount(address,address,uint256) (runs: 256, μ: 16850, ~: 16850) ERC20Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14068, ~: 14068) -ERC20Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75678, ~: 75650) -ERC20Test:testFuzzTransferSuccess(address,uint256) (runs: 256, μ: 205915, ~: 206904) +ERC20Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75677, ~: 75652) +ERC20Test:testFuzzTransferSuccess(address,uint256) (runs: 256, μ: 206226, ~: 206912) ERC20Test:testHasOwner() (gas: 12659) ERC20Test:testInitialSetup() (gas: 1459670) ERC20Test:testMintNonMinter() (gas: 12639) @@ -349,18 +349,18 @@ ERC2981Test:testDeleteDefaultRoyaltyNonOwner() (gas: 10538) ERC2981Test:testFuzzDeleteDefaultRoyaltyNonOwner(address) (runs: 256, μ: 13272, ~: 13272) ERC2981Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13973, ~: 13973) ERC2981Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 25308, ~: 25308) -ERC2981Test:testFuzzResetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 96744, ~: 97951) +ERC2981Test:testFuzzResetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 95830, ~: 97944) ERC2981Test:testFuzzResetTokenRoyaltyNonOwner(address) (runs: 256, μ: 13247, ~: 13247) -ERC2981Test:testFuzzRoyaltyInfoDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 80344, ~: 81404) -ERC2981Test:testFuzzRoyaltyInfoDeleteDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 64921, ~: 66104) -ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 121557, ~: 122880) -ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyaltyUpdate(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 167630, ~: 169575) -ERC2981Test:testFuzzRoyaltyInfoUpdateDefaultRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 88266, ~: 89093) +ERC2981Test:testFuzzRoyaltyInfoDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 80048, ~: 81404) +ERC2981Test:testFuzzRoyaltyInfoDeleteDefaultRoyalty(address,uint256,uint256,uint96,uint256) (runs: 256, μ: 65049, ~: 66111) +ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 119350, ~: 122880) +ERC2981Test:testFuzzRoyaltyInfoSetTokenRoyaltyUpdate(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 164319, ~: 169575) +ERC2981Test:testFuzzRoyaltyInfoUpdateDefaultRoyalty(address,address,uint256,uint256,uint96,uint256) (runs: 256, μ: 87276, ~: 89093) ERC2981Test:testFuzzSetDefaultRoyaltyNonOwner(address) (runs: 256, μ: 15526, ~: 15526) -ERC2981Test:testFuzzSetDefaultRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21354, ~: 21138) +ERC2981Test:testFuzzSetDefaultRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21329, ~: 21138) ERC2981Test:testFuzzSetTokenRoyaltyInvalidReceiver(address) (runs: 256, μ: 18627, ~: 18627) ERC2981Test:testFuzzSetTokenRoyaltyNonOwner(address) (runs: 256, μ: 15566, ~: 15566) -ERC2981Test:testFuzzSetTokenRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21395, ~: 21179) +ERC2981Test:testFuzzSetTokenRoyaltyTooHighFeeNumerator(uint96) (runs: 256, μ: 21370, ~: 21179) ERC2981Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14040, ~: 14040) ERC2981Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 30287, ~: 30287) ERC2981Test:testHasOwner() (gas: 12549) @@ -388,8 +388,8 @@ ERC2981Test:testSupportsInterfaceSuccessGasCost() (gas: 9207) ERC2981Test:testTransferOwnershipNonOwner() (gas: 12650) ERC2981Test:testTransferOwnershipSuccess() (gas: 22446) ERC2981Test:testTransferOwnershipToZeroAddress() (gas: 15558) -ERC4626VaultInvariants:invariantTotalAssets() (runs: 256, calls: 3840, reverts: 3242) -ERC4626VaultInvariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3242) +ERC4626VaultInvariants:invariantTotalAssets() (runs: 256, calls: 3840, reverts: 3265) +ERC4626VaultInvariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3265) ERC4626VaultTest:testCachedDomainSeparator() (gas: 10565) ERC4626VaultTest:testDepositInsufficientAllowance() (gas: 82791) ERC4626VaultTest:testDepositWithNoApproval() (gas: 24726) @@ -400,10 +400,10 @@ ERC4626VaultTest:testEmptyVaultDeposit() (gas: 567828) ERC4626VaultTest:testEmptyVaultMint() (gas: 568645) ERC4626VaultTest:testEmptyVaultRedeem() (gas: 203127) ERC4626VaultTest:testEmptyVaultwithdraw() (gas: 215972) -ERC4626VaultTest:testFail_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 554689, ~: 558238) -ERC4626VaultTest:testFail_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 556479, ~: 560079) -ERC4626VaultTest:testFuzzDomainSeparator(uint8) (runs: 256, μ: 11945, ~: 11966) -ERC4626VaultTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22183, ~: 22144) +ERC4626VaultTest:testFail_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 555471, ~: 557671) +ERC4626VaultTest:testFail_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 557328, ~: 560079) +ERC4626VaultTest:testFuzzDomainSeparator(uint8) (runs: 256, μ: 11946, ~: 11966) +ERC4626VaultTest:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22209, ~: 22213) ERC4626VaultTest:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 45214, ~: 45212) ERC4626VaultTest:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 70960, ~: 70956) ERC4626VaultTest:testInitialSetup() (gas: 5691876) @@ -424,32 +424,32 @@ ERC4626VaultTest:testVaultInteractionsForSomeoneElse() (gas: 224457) ERC4626VaultTest:testWithdrawInsufficientAllowance() (gas: 122541) ERC4626VaultTest:testWithdrawInsufficientAssets() (gas: 117821) ERC4626VaultTest:testWithdrawWithNoAssets() (gas: 21337) -ERC4626VaultTest:test_RT_deposit_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473462, ~: 476148) -ERC4626VaultTest:test_RT_deposit_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 475424, ~: 477896) -ERC4626VaultTest:test_RT_mint_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474735, ~: 476368) -ERC4626VaultTest:test_RT_mint_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 476807, ~: 478260) -ERC4626VaultTest:test_RT_redeem_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473602, ~: 476436) -ERC4626VaultTest:test_RT_redeem_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474050, ~: 476757) -ERC4626VaultTest:test_RT_withdraw_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 475167, ~: 478159) -ERC4626VaultTest:test_RT_withdraw_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 476400, ~: 478568) -ERC4626VaultTest:test_asset((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423619, ~: 427747) -ERC4626VaultTest:test_convertToAssets((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 429930, ~: 433124) -ERC4626VaultTest:test_convertToShares((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 429163, ~: 433053) -ERC4626VaultTest:test_deposit((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 470361, ~: 473747) -ERC4626VaultTest:test_maxDeposit((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423614, ~: 427742) -ERC4626VaultTest:test_maxMint((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423639, ~: 427766) -ERC4626VaultTest:test_maxRedeem((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423754, ~: 427882) -ERC4626VaultTest:test_maxWithdraw((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 425298, ~: 429475) -ERC4626VaultTest:test_mint((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 471143, ~: 474074) -ERC4626VaultTest:test_previewDeposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 466316, ~: 468670) -ERC4626VaultTest:test_previewMint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 467744, ~: 469126) -ERC4626VaultTest:test_previewRedeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 468003, ~: 470416) -ERC4626VaultTest:test_previewWithdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 470708, ~: 472239) -ERC4626VaultTest:test_redeem((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 473839, ~: 476922) -ERC4626VaultTest:test_totalAssets((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 424203, ~: 428330) -ERC4626VaultTest:test_withdraw((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 475248, ~: 478287) -ERC721Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3469) -ERC721Invariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3469) +ERC4626VaultTest:test_RT_deposit_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 471948, ~: 476180) +ERC4626VaultTest:test_RT_deposit_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474619, ~: 477648) +ERC4626VaultTest:test_RT_mint_redeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 472700, ~: 476390) +ERC4626VaultTest:test_RT_mint_withdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474298, ~: 478039) +ERC4626VaultTest:test_RT_redeem_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 473389, ~: 476644) +ERC4626VaultTest:test_RT_redeem_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 472901, ~: 476502) +ERC4626VaultTest:test_RT_withdraw_deposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474035, ~: 478059) +ERC4626VaultTest:test_RT_withdraw_mint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 474629, ~: 478512) +ERC4626VaultTest:test_asset((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423612, ~: 427737) +ERC4626VaultTest:test_convertToAssets((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 430189, ~: 433118) +ERC4626VaultTest:test_convertToShares((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 428704, ~: 432764) +ERC4626VaultTest:test_deposit((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 471356, ~: 473829) +ERC4626VaultTest:test_maxDeposit((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423606, ~: 427731) +ERC4626VaultTest:test_maxMint((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423631, ~: 427756) +ERC4626VaultTest:test_maxRedeem((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 423747, ~: 427871) +ERC4626VaultTest:test_maxWithdraw((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 425282, ~: 429274) +ERC4626VaultTest:test_mint((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 471845, ~: 474042) +ERC4626VaultTest:test_previewDeposit((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 465429, ~: 468740) +ERC4626VaultTest:test_previewMint((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 465656, ~: 469062) +ERC4626VaultTest:test_previewRedeem((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 467629, ~: 470521) +ERC4626VaultTest:test_previewWithdraw((address[4],uint256[4],uint256[4],int256),uint256) (runs: 256, μ: 470582, ~: 472075) +ERC4626VaultTest:test_redeem((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 474584, ~: 476960) +ERC4626VaultTest:test_totalAssets((address[4],uint256[4],uint256[4],int256)) (runs: 256, μ: 424197, ~: 428320) +ERC4626VaultTest:test_withdraw((address[4],uint256[4],uint256[4],int256),uint256,uint256) (runs: 256, μ: 476497, ~: 478329) +ERC721Invariants:invariantOwner() (runs: 256, calls: 3840, reverts: 3439) +ERC721Invariants:invariantTotalSupply() (runs: 256, calls: 3840, reverts: 3439) ERC721Test:testApproveClearingApprovalWithNoPriorApproval() (gas: 177662) ERC721Test:testApproveClearingApprovalWithPriorApproval() (gas: 186718) ERC721Test:testApproveFromApprovedAddress() (gas: 199708) @@ -470,30 +470,30 @@ ERC721Test:testCachedDomainSeparator() (gas: 10588) ERC721Test:testDomainSeparator() (gas: 11839) ERC721Test:testEIP712Domain() (gas: 18910) ERC721Test:testFuzzApproveClearingApprovalWithNoPriorApproval(address,address) (runs: 256, μ: 197151, ~: 197161) -ERC721Test:testFuzzApproveClearingApprovalWithPriorApproval(address,address) (runs: 256, μ: 184796, ~: 184796) +ERC721Test:testFuzzApproveClearingApprovalWithPriorApproval(address,address) (runs: 256, μ: 184786, ~: 184796) ERC721Test:testFuzzApproveFromNonOwner(address) (runs: 256, μ: 172896, ~: 172896) ERC721Test:testFuzzApproveFromOperatorAddress(address,address,address) (runs: 256, μ: 223299, ~: 223299) ERC721Test:testFuzzApproveWithNoPriorApproval(address,address) (runs: 256, μ: 197106, ~: 197116) ERC721Test:testFuzzApproveWithPriorApproval(address,address) (runs: 256, μ: 204598, ~: 204608) -ERC721Test:testFuzzBurnSuccess(address) (runs: 256, μ: 305909, ~: 305902) -ERC721Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12032, ~: 12052) -ERC721Test:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22357, ~: 22314) +ERC721Test:testFuzzBurnSuccess(address) (runs: 256, μ: 305908, ~: 305902) +ERC721Test:testFuzzDomainSeparator(uint8) (runs: 256, μ: 12030, ~: 12052) +ERC721Test:testFuzzEIP712Domain(bytes1,uint8,bytes32,uint256[]) (runs: 256, μ: 22387, ~: 22390) ERC721Test:testFuzzGetApprovedApprovedTokenId(address,address) (runs: 256, μ: 194737, ~: 194747) ERC721Test:testFuzzPermitInvalid(string,string,uint16) (runs: 256, μ: 201644, ~: 201642) ERC721Test:testFuzzPermitSuccess(string,string,uint16) (runs: 256, μ: 227845, ~: 227841) ERC721Test:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13938, ~: 13938) -ERC721Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48670, ~: 48653) +ERC721Test:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 48669, ~: 48653) ERC721Test:testFuzzSafeMintNonMinter(address) (runs: 256, μ: 15894, ~: 15894) -ERC721Test:testFuzzSafeMintSuccess(address[]) (runs: 256, μ: 21181593, ~: 20747833) -ERC721Test:testFuzzSafeTransferFromWithData(address,address,address,bytes) (runs: 256, μ: 1457816, ~: 1454213) +ERC721Test:testFuzzSafeMintSuccess(address[]) (runs: 256, μ: 21415679, ~: 21358067) +ERC721Test:testFuzzSafeTransferFromWithData(address,address,address,bytes) (runs: 256, μ: 1457652, ~: 1458782) ERC721Test:testFuzzSetApprovalForAllSuccess(address,address) (runs: 256, μ: 189633, ~: 189633) -ERC721Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15822, ~: 15749) +ERC721Test:testFuzzSetMinterNonOwner(address,string) (runs: 256, μ: 15823, ~: 15822) ERC721Test:testFuzzSetMinterSuccess(string) (runs: 256, μ: 33828, ~: 33828) -ERC721Test:testFuzzTokenByIndex(address,string[]) (runs: 256, μ: 21342536, ~: 21298802) -ERC721Test:testFuzzTotalSupply(address,string[]) (runs: 256, μ: 21168734, ~: 21123850) -ERC721Test:testFuzzTransferFrom(address,address,address) (runs: 256, μ: 568386, ~: 568369) +ERC721Test:testFuzzTokenByIndex(address,string[]) (runs: 256, μ: 22553151, ~: 23256393) +ERC721Test:testFuzzTotalSupply(address,string[]) (runs: 256, μ: 22369579, ~: 23065792) +ERC721Test:testFuzzTransferFrom(address,address,address) (runs: 256, μ: 568388, ~: 568369) ERC721Test:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14090, ~: 14090) -ERC721Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75721, ~: 75693) +ERC721Test:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 75722, ~: 75696) ERC721Test:testGetApprovedApprovedTokenId() (gas: 194649) ERC721Test:testGetApprovedInvalidTokenId() (gas: 11097) ERC721Test:testGetApprovedNotApprovedTokenId() (gas: 170887) @@ -556,19 +556,19 @@ ERC721Test:testTransferOwnershipToZeroAddress() (gas: 15608) MathTest:testCbrtRoundDown() (gas: 49935) MathTest:testCbrtRoundUp() (gas: 50582) MathTest:testCeilDiv() (gas: 14326) -MathTest:testFuzzCbrt(uint256,bool) (runs: 256, μ: 22251, ~: 22052) +MathTest:testFuzzCbrt(uint256,bool) (runs: 256, μ: 22270, ~: 22088) MathTest:testFuzzCeilDiv(uint256,uint256) (runs: 256, μ: 9672, ~: 9699) MathTest:testFuzzInt256Average(int256,int256) (runs: 256, μ: 8572, ~: 8572) -MathTest:testFuzzLog10(uint256,bool) (runs: 256, μ: 10138, ~: 10152) -MathTest:testFuzzLog2(uint256,bool) (runs: 256, μ: 9977, ~: 9994) -MathTest:testFuzzLog256(uint256,bool) (runs: 256, μ: 10011, ~: 10018) -MathTest:testFuzzMulDiv(uint256,uint256,uint256) (runs: 256, μ: 14141, ~: 13888) -MathTest:testFuzzMulDivDomain(uint256,uint256,uint256) (runs: 256, μ: 10485, ~: 10570) +MathTest:testFuzzLog10(uint256,bool) (runs: 256, μ: 10139, ~: 10152) +MathTest:testFuzzLog2(uint256,bool) (runs: 256, μ: 9981, ~: 9994) +MathTest:testFuzzLog256(uint256,bool) (runs: 256, μ: 10017, ~: 10018) +MathTest:testFuzzMulDiv(uint256,uint256,uint256) (runs: 256, μ: 14136, ~: 13888) +MathTest:testFuzzMulDivDomain(uint256,uint256,uint256) (runs: 256, μ: 10487, ~: 10570) MathTest:testFuzzSignum(int256) (runs: 256, μ: 8464, ~: 8456) MathTest:testFuzzUint256Average(uint256,uint256) (runs: 256, μ: 8635, ~: 8635) -MathTest:testFuzzWadCbrt(uint256) (runs: 256, μ: 22233, ~: 21912) -MathTest:testFuzzWadExp(int256) (runs: 256, μ: 15255, ~: 15363) -MathTest:testFuzzWadLn(int256) (runs: 256, μ: 16743, ~: 16441) +MathTest:testFuzzWadCbrt(uint256) (runs: 256, μ: 22232, ~: 21948) +MathTest:testFuzzWadExp(int256) (runs: 256, μ: 15254, ~: 15363) +MathTest:testFuzzWadLn(int256) (runs: 256, μ: 16746, ~: 16483) MathTest:testInt256Average() (gas: 18313) MathTest:testLog10RoundDown() (gas: 24985) MathTest:testLog10RoundUp() (gas: 26166) @@ -589,8 +589,8 @@ MathTest:testWadExp() (gas: 33776) MathTest:testWadExpOverflow() (gas: 11127) MathTest:testWadLn() (gas: 30882) MathTest:testWadLnNegativeValues() (gas: 11130) -MerkleProofVerificationTest:testFuzzMultiProofVerifySingleLeaf(bytes32[],uint256) (runs: 256, μ: 1649984786, ~: 1649981310) -MerkleProofVerificationTest:testFuzzVerify(bytes32[],uint256) (runs: 256, μ: 135978381, ~: 135974981) +MerkleProofVerificationTest:testFuzzMultiProofVerifySingleLeaf(bytes32[],uint256) (runs: 256, μ: 1649985418, ~: 1649982142) +MerkleProofVerificationTest:testFuzzVerify(bytes32[],uint256) (runs: 256, μ: 135979118, ~: 135975813) MerkleProofVerificationTest:testFuzzVerifyMultiProofMultipleLeaves(bool,bool,bool) (runs: 256, μ: 412477124, ~: 412477119) MerkleProofVerificationTest:testInvalidMerkleMultiProof() (gas: 412480569) MerkleProofVerificationTest:testInvalidMerkleProof() (gas: 33971264) @@ -615,10 +615,10 @@ Ownable2StepInvariants:invariantPendingOwner() (runs: 256, calls: 3840, reverts: Ownable2StepTest:testAcceptOwnershipNonPendingOwner() (gas: 47657) Ownable2StepTest:testAcceptOwnershipSuccess() (gas: 40811) Ownable2StepTest:testFuzzAcceptOwnershipNonPendingOwner(address) (runs: 256, μ: 46867, ~: 46867) -Ownable2StepTest:testFuzzAcceptOwnershipSuccess(address,address) (runs: 256, μ: 67647, ~: 67618) -Ownable2StepTest:testFuzzPendingOwnerResetAfterRenounceOwnership(address) (runs: 256, μ: 40157, ~: 40140) +Ownable2StepTest:testFuzzAcceptOwnershipSuccess(address,address) (runs: 256, μ: 67647, ~: 67620) +Ownable2StepTest:testFuzzPendingOwnerResetAfterRenounceOwnership(address) (runs: 256, μ: 40156, ~: 40140) Ownable2StepTest:testFuzzRenounceOwnershipNonOwner(address) (runs: 256, μ: 13955, ~: 13955) -Ownable2StepTest:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 45373, ~: 45356) +Ownable2StepTest:testFuzzRenounceOwnershipSuccess(address) (runs: 256, μ: 45372, ~: 45356) Ownable2StepTest:testFuzzTransferOwnershipNonOwner(address,address) (runs: 256, μ: 14107, ~: 14107) Ownable2StepTest:testFuzzTransferOwnershipSuccess(address,address) (runs: 256, μ: 52209, ~: 52209) Ownable2StepTest:testHasOwner() (gas: 12528) @@ -658,13 +658,13 @@ SignatureCheckerTest:testFuzzEOAWithInvalidSignature(bytes,string) (runs: 256, SignatureCheckerTest:testFuzzEOAWithInvalidSigner(string,string) (runs: 256, μ: 22161, ~: 22222) SignatureCheckerTest:testFuzzEOAWithValidSignature(string,string) (runs: 256, μ: 21280, ~: 21341) SignatureCheckerTest:testInitialSetup() (gas: 8315) -TimelockControllerInvariants:invariantExecutedLessThanOrEqualToScheduled() (runs: 256, calls: 3840, reverts: 1278) -TimelockControllerInvariants:invariantExecutedProposalCancellation() (runs: 256, calls: 3840, reverts: 1290) -TimelockControllerInvariants:invariantExecutingCancelledProposal() (runs: 256, calls: 3840, reverts: 1339) -TimelockControllerInvariants:invariantExecutingNotReadyProposal() (runs: 256, calls: 3840, reverts: 1273) -TimelockControllerInvariants:invariantOnceProposalExecution() (runs: 256, calls: 3840, reverts: 1302) -TimelockControllerInvariants:invariantProposalsExecutedMatchCount() (runs: 256, calls: 3840, reverts: 1278) -TimelockControllerInvariants:invariantSumOfProposals() (runs: 256, calls: 3840, reverts: 1278) +TimelockControllerInvariants:invariantExecutedLessThanOrEqualToScheduled() (runs: 256, calls: 3840, reverts: 1225) +TimelockControllerInvariants:invariantExecutedProposalCancellation() (runs: 256, calls: 3840, reverts: 1142) +TimelockControllerInvariants:invariantExecutingCancelledProposal() (runs: 256, calls: 3840, reverts: 1197) +TimelockControllerInvariants:invariantExecutingNotReadyProposal() (runs: 256, calls: 3840, reverts: 1228) +TimelockControllerInvariants:invariantOnceProposalExecution() (runs: 256, calls: 3840, reverts: 1202) +TimelockControllerInvariants:invariantProposalsExecutedMatchCount() (runs: 256, calls: 3840, reverts: 1225) +TimelockControllerInvariants:invariantSumOfProposals() (runs: 256, calls: 3840, reverts: 1225) TimelockControllerTest:testAdminCannotBatchExecute() (gas: 750573) TimelockControllerTest:testAdminCannotBatchSchedule() (gas: 748359) TimelockControllerTest:testAdminCannotCancel() (gas: 13280) @@ -702,10 +702,10 @@ TimelockControllerTest:testExecutorCanExecute() (gas: 29826) TimelockControllerTest:testExecutorCannotBatchSchedule() (gas: 1485375) TimelockControllerTest:testExecutorCannotCancel() (gas: 15281) TimelockControllerTest:testExecutorCannotSchedule() (gas: 18977) -TimelockControllerTest:testFuzzBatchValue(uint256) (runs: 256, μ: 4653469, ~: 4653589) -TimelockControllerTest:testFuzzHashOperation(address,uint256,bytes,bytes32,bytes32) (runs: 256, μ: 11084, ~: 10967) -TimelockControllerTest:testFuzzHashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32) (runs: 256, μ: 1880733, ~: 1890407) -TimelockControllerTest:testFuzzOperationValue(uint256) (runs: 256, μ: 113815, ~: 113948) +TimelockControllerTest:testFuzzBatchValue(uint256) (runs: 256, μ: 4653492, ~: 4653589) +TimelockControllerTest:testFuzzHashOperation(address,uint256,bytes,bytes32,bytes32) (runs: 256, μ: 11069, ~: 10967) +TimelockControllerTest:testFuzzHashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32) (runs: 256, μ: 1907207, ~: 1934989) +TimelockControllerTest:testFuzzOperationValue(uint256) (runs: 256, μ: 113851, ~: 113948) TimelockControllerTest:testHandleERC1155() (gas: 41494156) TimelockControllerTest:testHandleERC721() (gas: 7039956) TimelockControllerTest:testHashOperation() (gas: 13089) diff --git a/src/snekmate/auth/AccessControl.vy b/src/snekmate/auth/AccessControl.vy index a7f5c125..2b6bc9a2 100644 --- a/src/snekmate/auth/AccessControl.vy +++ b/src/snekmate/auth/AccessControl.vy @@ -7,8 +7,8 @@ @notice These functions can be used to implement role-based access control mechanisms. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and - be unique. The best way to achieve this is by using `public - constant` hash digests: + be unique. The best way to achieve this is by using `public` + `constant` hash digests: ```vy MY_ROLE: public(constant(bytes32)) = keccak256("MY_ROLE"); ``` From 6af386fa5dc601b6120c3e576b4dc338117cadf0 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Mon, 25 Mar 2024 15:34:29 +0100 Subject: [PATCH 7/8] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=EF=B8=8F=20Use=20`MIN?= =?UTF-8?q?TER=5FROLE`=20and=20`PAUSER=5FROLE`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- .gas-snapshot | 6 +- src/snekmate/auth/mocks/AccessControlMock.vy | 8 +- test/auth/AccessControl.t.sol | 346 +++++++++--------- .../interfaces/IAccessControlExtended.sol | 4 +- 4 files changed, 174 insertions(+), 190 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index dfc8ad6c..f48df88a 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,5 +1,5 @@ -AccessControlInvariants:statefulFuzzGetRoleAdmin() (runs: 256, calls: 3840, reverts: 3840) -AccessControlInvariants:statefulFuzzHasRole() (runs: 256, calls: 3840, reverts: 3840) +AccessControlInvariants:statefulFuzzGetRoleAdmin() (runs: 256, calls: 3840, reverts: 3839) +AccessControlInvariants:statefulFuzzHasRole() (runs: 256, calls: 3840, reverts: 3839) AccessControlTest:testFuzzGrantRoleAdminRoleSuccess(address) (runs: 256, μ: 44071, ~: 44071) AccessControlTest:testFuzzGrantRoleMultipleTimesSuccess(address) (runs: 256, μ: 49948, ~: 49948) AccessControlTest:testFuzzGrantRoleNonAdmin(address,address) (runs: 256, μ: 16545, ~: 16545) @@ -9,7 +9,7 @@ AccessControlTest:testFuzzRenounceRoleNonMsgSender(address) (runs: 256, μ: 9556 AccessControlTest:testFuzzRenounceRoleSuccess(address) (runs: 256, μ: 41949, ~: 41934) AccessControlTest:testFuzzRevokeRoleMultipleTimesSuccess(address) (runs: 256, μ: 41722, ~: 41707) AccessControlTest:testFuzzRevokeRoleNonAdmin(address,address) (runs: 256, μ: 16499, ~: 16499) -AccessControlTest:testFuzzRevokeRoleSuccess(address) (runs: 256, μ: 40564, ~: 40549) +AccessControlTest:testFuzzRevokeRoleSuccess(address) (runs: 256, μ: 40565, ~: 40549) AccessControlTest:testFuzzSetRoleAdminPreviousAdminCallsGrantRole(address,address) (runs: 256, μ: 76066, ~: 76066) AccessControlTest:testFuzzSetRoleAdminPreviousAdminCallsRevokeRole(address,address) (runs: 256, μ: 101598, ~: 101598) AccessControlTest:testFuzzSetRoleAdminSuccess(address,address) (runs: 256, μ: 91014, ~: 91014) diff --git a/src/snekmate/auth/mocks/AccessControlMock.vy b/src/snekmate/auth/mocks/AccessControlMock.vy index d980eb75..69919f60 100644 --- a/src/snekmate/auth/mocks/AccessControlMock.vy +++ b/src/snekmate/auth/mocks/AccessControlMock.vy @@ -26,11 +26,11 @@ initializes: ac # @dev An additional 32-byte access role. -ADDITIONAL_ROLE_1: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_1") +MINTER_ROLE: public(constant(bytes32)) = keccak256("MINTER_ROLE") # @dev An additional 32-byte access role. -ADDITIONAL_ROLE_2: public(constant(bytes32)) = keccak256("ADDITIONAL_ROLE_2") +PAUSER_ROLE: public(constant(bytes32)) = keccak256("PAUSER_ROLE") # @dev We export (i.e. the runtime bytecode exposes these @@ -66,5 +66,5 @@ def __init__(): # The following line assigns the `DEFAULT_ADMIN_ROLE` # to the `msg.sender`. ac.__init__() - ac._grant_role(ADDITIONAL_ROLE_1, msg.sender) - ac._grant_role(ADDITIONAL_ROLE_2, msg.sender) + ac._grant_role(MINTER_ROLE, msg.sender) + ac._grant_role(PAUSER_ROLE, msg.sender) diff --git a/test/auth/AccessControl.t.sol b/test/auth/AccessControl.t.sol index a10c0559..7e47e298 100644 --- a/test/auth/AccessControl.t.sol +++ b/test/auth/AccessControl.t.sol @@ -11,8 +11,8 @@ import {IAccessControlExtended} from "./interfaces/IAccessControlExtended.sol"; contract AccessControlTest is Test { bytes32 private constant DEFAULT_ADMIN_ROLE = bytes32(0); - bytes32 private constant ADDITIONAL_ROLE_1 = keccak256("ADDITIONAL_ROLE_1"); - bytes32 private constant ADDITIONAL_ROLE_2 = keccak256("ADDITIONAL_ROLE_2"); + bytes32 private constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 private constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); VyperDeployer private vyperDeployer = new VyperDeployer(); @@ -32,30 +32,24 @@ contract AccessControlTest is Test { function testInitialSetup() public { assertEq(accessControl.DEFAULT_ADMIN_ROLE(), DEFAULT_ADMIN_ROLE); - assertEq(accessControl.ADDITIONAL_ROLE_1(), ADDITIONAL_ROLE_1); - assertEq(accessControl.ADDITIONAL_ROLE_2(), ADDITIONAL_ROLE_2); + assertEq(accessControl.MINTER_ROLE(), MINTER_ROLE); + assertEq(accessControl.PAUSER_ROLE(), PAUSER_ROLE); assertTrue(accessControl.hasRole(DEFAULT_ADMIN_ROLE, deployer)); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, deployer)); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_2, deployer)); + assertTrue(accessControl.hasRole(MINTER_ROLE, deployer)); + assertTrue(accessControl.hasRole(PAUSER_ROLE, deployer)); assertEq( accessControl.getRoleAdmin(DEFAULT_ADMIN_ROLE), DEFAULT_ADMIN_ROLE ); - assertEq( - accessControl.getRoleAdmin(ADDITIONAL_ROLE_1), - DEFAULT_ADMIN_ROLE - ); - assertEq( - accessControl.getRoleAdmin(ADDITIONAL_ROLE_2), - DEFAULT_ADMIN_ROLE - ); + assertEq(accessControl.getRoleAdmin(MINTER_ROLE), DEFAULT_ADMIN_ROLE); + assertEq(accessControl.getRoleAdmin(PAUSER_ROLE), DEFAULT_ADMIN_ROLE); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(DEFAULT_ADMIN_ROLE, deployer, deployer); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, deployer, deployer); + emit IAccessControl.RoleGranted(MINTER_ROLE, deployer, deployer); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_2, deployer, deployer); + emit IAccessControl.RoleGranted(PAUSER_ROLE, deployer, deployer); accessControlInitialEvent = IAccessControlExtended( vyperDeployer.deployContract( "src/snekmate/auth/mocks/", @@ -66,33 +60,23 @@ contract AccessControlTest is Test { accessControlInitialEvent.DEFAULT_ADMIN_ROLE(), DEFAULT_ADMIN_ROLE ); - assertEq( - accessControlInitialEvent.ADDITIONAL_ROLE_1(), - ADDITIONAL_ROLE_1 - ); - assertEq( - accessControlInitialEvent.ADDITIONAL_ROLE_2(), - ADDITIONAL_ROLE_2 - ); + assertEq(accessControlInitialEvent.MINTER_ROLE(), MINTER_ROLE); + assertEq(accessControlInitialEvent.PAUSER_ROLE(), PAUSER_ROLE); assertTrue( accessControlInitialEvent.hasRole(DEFAULT_ADMIN_ROLE, deployer) ); - assertTrue( - accessControlInitialEvent.hasRole(ADDITIONAL_ROLE_1, deployer) - ); - assertTrue( - accessControlInitialEvent.hasRole(ADDITIONAL_ROLE_2, deployer) - ); + assertTrue(accessControlInitialEvent.hasRole(MINTER_ROLE, deployer)); + assertTrue(accessControlInitialEvent.hasRole(PAUSER_ROLE, deployer)); assertEq( accessControlInitialEvent.getRoleAdmin(DEFAULT_ADMIN_ROLE), DEFAULT_ADMIN_ROLE ); assertEq( - accessControlInitialEvent.getRoleAdmin(ADDITIONAL_ROLE_1), + accessControlInitialEvent.getRoleAdmin(MINTER_ROLE), DEFAULT_ADMIN_ROLE ); assertEq( - accessControlInitialEvent.getRoleAdmin(ADDITIONAL_ROLE_2), + accessControlInitialEvent.getRoleAdmin(PAUSER_ROLE), DEFAULT_ADMIN_ROLE ); } @@ -132,9 +116,9 @@ contract AccessControlTest is Test { address account = makeAddr("account"); vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -154,40 +138,40 @@ contract AccessControlTest is Test { address account = makeAddr("account"); vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } function testGrantRoleNonAdmin() public { vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.grantRole(ADDITIONAL_ROLE_1, makeAddr("account")); + accessControl.grantRole(MINTER_ROLE, makeAddr("account")); } function testRevokeRoleSuccess() public { address admin = deployer; address account = makeAddr("account"); vm.startPrank(admin); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, admin); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, admin); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -196,20 +180,20 @@ contract AccessControlTest is Test { address account = makeAddr("account"); vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, admin); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, admin); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -223,13 +207,13 @@ contract AccessControlTest is Test { assertTrue(!accessControl.hasRole(DEFAULT_ADMIN_ROLE, admin)); vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.revokeRole(ADDITIONAL_ROLE_1, admin); + accessControl.revokeRole(MINTER_ROLE, admin); vm.stopPrank(); } function testRevokeRoleNonAdmin() public { vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.revokeRole(ADDITIONAL_ROLE_1, makeAddr("account")); + accessControl.revokeRole(MINTER_ROLE, makeAddr("account")); } function testRenounceRoleSuccess() public { @@ -237,9 +221,9 @@ contract AccessControlTest is Test { address account = makeAddr("account"); vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); vm.startPrank(account); @@ -248,9 +232,9 @@ contract AccessControlTest is Test { assertTrue(!accessControl.hasRole(DEFAULT_ADMIN_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, account); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, account); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -259,9 +243,9 @@ contract AccessControlTest is Test { address account = makeAddr("account"); vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); vm.startPrank(account); @@ -270,15 +254,15 @@ contract AccessControlTest is Test { assertTrue(!accessControl.hasRole(DEFAULT_ADMIN_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, account); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, account); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -300,7 +284,7 @@ contract AccessControlTest is Test { vm.expectRevert( bytes("AccessControl: can only renounce roles for itself") ); - accessControl.renounceRole(ADDITIONAL_ROLE_1, makeAddr("account")); + accessControl.renounceRole(MINTER_ROLE, makeAddr("account")); } function testSetRoleAdminSuccess() public { @@ -311,11 +295,11 @@ contract AccessControlTest is Test { vm.startPrank(admin); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleAdminChanged( - ADDITIONAL_ROLE_1, + MINTER_ROLE, DEFAULT_ADMIN_ROLE, otherAdminRole ); - accessControl.set_role_admin(ADDITIONAL_ROLE_1, otherAdminRole); + accessControl.set_role_admin(MINTER_ROLE, otherAdminRole); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(otherAdminRole, otherAdmin, admin); @@ -324,16 +308,16 @@ contract AccessControlTest is Test { vm.stopPrank(); vm.startPrank(otherAdmin); - assertEq(accessControl.getRoleAdmin(ADDITIONAL_ROLE_1), otherAdminRole); + assertEq(accessControl.getRoleAdmin(MINTER_ROLE), otherAdminRole); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, otherAdmin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, otherAdmin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, otherAdmin); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, otherAdmin); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -345,11 +329,11 @@ contract AccessControlTest is Test { vm.startPrank(admin); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleAdminChanged( - ADDITIONAL_ROLE_1, + MINTER_ROLE, DEFAULT_ADMIN_ROLE, otherAdminRole ); - accessControl.set_role_admin(ADDITIONAL_ROLE_1, otherAdminRole); + accessControl.set_role_admin(MINTER_ROLE, otherAdminRole); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(otherAdminRole, otherAdmin, admin); @@ -357,7 +341,7 @@ contract AccessControlTest is Test { assertTrue(accessControl.hasRole(otherAdminRole, otherAdmin)); vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); + accessControl.grantRole(MINTER_ROLE, account); vm.stopPrank(); } @@ -367,15 +351,15 @@ contract AccessControlTest is Test { address account = makeAddr("account"); bytes32 otherAdminRole = keccak256("OTHER_ADMIN_ROLE"); vm.startPrank(admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); + accessControl.grantRole(MINTER_ROLE, account); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleAdminChanged( - ADDITIONAL_ROLE_1, + MINTER_ROLE, DEFAULT_ADMIN_ROLE, otherAdminRole ); - accessControl.set_role_admin(ADDITIONAL_ROLE_1, otherAdminRole); + accessControl.set_role_admin(MINTER_ROLE, otherAdminRole); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(otherAdminRole, otherAdmin, admin); @@ -383,7 +367,7 @@ contract AccessControlTest is Test { assertTrue(accessControl.hasRole(otherAdminRole, otherAdmin)); vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); + accessControl.revokeRole(MINTER_ROLE, account); vm.stopPrank(); } @@ -392,9 +376,9 @@ contract AccessControlTest is Test { address admin = deployer; vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -414,15 +398,15 @@ contract AccessControlTest is Test { address admin = deployer; vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -433,26 +417,26 @@ contract AccessControlTest is Test { vm.assume(nonAdmin != deployer); vm.prank(nonAdmin); vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); + accessControl.grantRole(MINTER_ROLE, account); } function testFuzzRevokeRoleSuccess(address account) public { vm.assume(account != deployer); address admin = deployer; vm.startPrank(admin); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, admin); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, admin); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -461,20 +445,20 @@ contract AccessControlTest is Test { address admin = deployer; vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, admin); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, admin); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -485,7 +469,7 @@ contract AccessControlTest is Test { vm.assume(nonAdmin != deployer); vm.prank(nonAdmin); vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); + accessControl.revokeRole(MINTER_ROLE, account); } function testFuzzRenounceRoleSuccess(address account) public { @@ -493,9 +477,9 @@ contract AccessControlTest is Test { address admin = deployer; vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); vm.startPrank(account); @@ -504,9 +488,9 @@ contract AccessControlTest is Test { assertTrue(!accessControl.hasRole(DEFAULT_ADMIN_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, account); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, account); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -515,9 +499,9 @@ contract AccessControlTest is Test { address admin = deployer; vm.startPrank(admin); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, admin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); vm.startPrank(account); @@ -526,15 +510,15 @@ contract AccessControlTest is Test { assertTrue(!accessControl.hasRole(DEFAULT_ADMIN_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, account); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, account); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + accessControl.renounceRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -543,7 +527,7 @@ contract AccessControlTest is Test { vm.expectRevert( bytes("AccessControl: can only renounce roles for itself") ); - accessControl.renounceRole(ADDITIONAL_ROLE_1, account); + accessControl.renounceRole(MINTER_ROLE, account); } function testFuzzSetRoleAdminSuccess( @@ -556,11 +540,11 @@ contract AccessControlTest is Test { vm.startPrank(admin); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleAdminChanged( - ADDITIONAL_ROLE_1, + MINTER_ROLE, DEFAULT_ADMIN_ROLE, otherAdminRole ); - accessControl.set_role_admin(ADDITIONAL_ROLE_1, otherAdminRole); + accessControl.set_role_admin(MINTER_ROLE, otherAdminRole); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(otherAdminRole, otherAdmin, admin); @@ -569,16 +553,16 @@ contract AccessControlTest is Test { vm.stopPrank(); vm.startPrank(otherAdmin); - assertEq(accessControl.getRoleAdmin(ADDITIONAL_ROLE_1), otherAdminRole); + assertEq(accessControl.getRoleAdmin(MINTER_ROLE), otherAdminRole); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleGranted(ADDITIONAL_ROLE_1, account, otherAdmin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); - assertTrue(accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleGranted(MINTER_ROLE, account, otherAdmin); + accessControl.grantRole(MINTER_ROLE, account); + assertTrue(accessControl.hasRole(MINTER_ROLE, account)); vm.expectEmit(true, true, true, false); - emit IAccessControl.RoleRevoked(ADDITIONAL_ROLE_1, account, otherAdmin); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); - assertTrue(!accessControl.hasRole(ADDITIONAL_ROLE_1, account)); + emit IAccessControl.RoleRevoked(MINTER_ROLE, account, otherAdmin); + accessControl.revokeRole(MINTER_ROLE, account); + assertTrue(!accessControl.hasRole(MINTER_ROLE, account)); vm.stopPrank(); } @@ -592,11 +576,11 @@ contract AccessControlTest is Test { vm.startPrank(admin); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleAdminChanged( - ADDITIONAL_ROLE_1, + MINTER_ROLE, DEFAULT_ADMIN_ROLE, otherAdminRole ); - accessControl.set_role_admin(ADDITIONAL_ROLE_1, otherAdminRole); + accessControl.set_role_admin(MINTER_ROLE, otherAdminRole); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(otherAdminRole, otherAdmin, admin); @@ -604,7 +588,7 @@ contract AccessControlTest is Test { assertTrue(accessControl.hasRole(otherAdminRole, otherAdmin)); vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); + accessControl.grantRole(MINTER_ROLE, account); vm.stopPrank(); } @@ -616,15 +600,15 @@ contract AccessControlTest is Test { address admin = deployer; bytes32 otherAdminRole = keccak256("OTHER_ADMIN_ROLE"); vm.startPrank(admin); - accessControl.grantRole(ADDITIONAL_ROLE_1, account); + accessControl.grantRole(MINTER_ROLE, account); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleAdminChanged( - ADDITIONAL_ROLE_1, + MINTER_ROLE, DEFAULT_ADMIN_ROLE, otherAdminRole ); - accessControl.set_role_admin(ADDITIONAL_ROLE_1, otherAdminRole); + accessControl.set_role_admin(MINTER_ROLE, otherAdminRole); vm.expectEmit(true, true, true, false); emit IAccessControl.RoleGranted(otherAdminRole, otherAdmin, admin); @@ -632,15 +616,15 @@ contract AccessControlTest is Test { assertTrue(accessControl.hasRole(otherAdminRole, otherAdmin)); vm.expectRevert(bytes("AccessControl: account is missing role")); - accessControl.revokeRole(ADDITIONAL_ROLE_1, account); + accessControl.revokeRole(MINTER_ROLE, account); vm.stopPrank(); } } contract AccessControlInvariants is Test { bytes32 private constant DEFAULT_ADMIN_ROLE = bytes32(0); - bytes32 private constant ADDITIONAL_ROLE_1 = keccak256("ADDITIONAL_ROLE_1"); - bytes32 private constant ADDITIONAL_ROLE_2 = keccak256("ADDITIONAL_ROLE_2"); + bytes32 private constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 private constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); VyperDeployer private vyperDeployer = new VyperDeployer(); @@ -660,8 +644,8 @@ contract AccessControlInvariants is Test { accessControl, deployer, DEFAULT_ADMIN_ROLE, - ADDITIONAL_ROLE_1, - ADDITIONAL_ROLE_2 + MINTER_ROLE, + PAUSER_ROLE ); targetContract(address(accessControlHandler)); } @@ -672,12 +656,12 @@ contract AccessControlInvariants is Test { accessControlHandler.hasRole(DEFAULT_ADMIN_ROLE, deployer) ); assertEq( - accessControl.hasRole(ADDITIONAL_ROLE_1, deployer), - accessControlHandler.hasRole(ADDITIONAL_ROLE_1, deployer) + accessControl.hasRole(MINTER_ROLE, deployer), + accessControlHandler.hasRole(MINTER_ROLE, deployer) ); assertEq( - accessControl.hasRole(ADDITIONAL_ROLE_2, deployer), - accessControlHandler.hasRole(ADDITIONAL_ROLE_2, deployer) + accessControl.hasRole(PAUSER_ROLE, deployer), + accessControlHandler.hasRole(PAUSER_ROLE, deployer) ); } @@ -687,12 +671,12 @@ contract AccessControlInvariants is Test { accessControlHandler.getRoleAdmin(DEFAULT_ADMIN_ROLE) ); assertEq( - accessControl.getRoleAdmin(ADDITIONAL_ROLE_1), - accessControlHandler.getRoleAdmin(ADDITIONAL_ROLE_1) + accessControl.getRoleAdmin(MINTER_ROLE), + accessControlHandler.getRoleAdmin(MINTER_ROLE) ); assertEq( - accessControl.getRoleAdmin(ADDITIONAL_ROLE_2), - accessControlHandler.getRoleAdmin(ADDITIONAL_ROLE_2) + accessControl.getRoleAdmin(PAUSER_ROLE), + accessControlHandler.getRoleAdmin(PAUSER_ROLE) ); } } @@ -700,8 +684,8 @@ contract AccessControlInvariants is Test { contract AccessControlHandler { /* solhint-disable var-name-mixedcase */ bytes32 private immutable DEFAULT_ADMIN_ROLE; - bytes32 private immutable ADDITIONAL_ROLE_1; - bytes32 private immutable ADDITIONAL_ROLE_2; + bytes32 private immutable MINTER_ROLE; + bytes32 private immutable PAUSER_ROLE; /* solhint-enable var-name-mixedcase */ mapping(bytes32 => mapping(address => bool)) public hasRole; @@ -713,16 +697,16 @@ contract AccessControlHandler { IAccessControlExtended accessControl_, address defaultAdmin_, bytes32 adminRole_, - bytes32 additionalRole1_, - bytes32 additionalRole2_ + bytes32 minterRole_, + bytes32 pauserRole_ ) { accessControl = accessControl_; DEFAULT_ADMIN_ROLE = adminRole_; - ADDITIONAL_ROLE_1 = additionalRole1_; - ADDITIONAL_ROLE_2 = additionalRole2_; + MINTER_ROLE = minterRole_; + PAUSER_ROLE = pauserRole_; hasRole[DEFAULT_ADMIN_ROLE][defaultAdmin_] = true; - hasRole[ADDITIONAL_ROLE_1][defaultAdmin_] = true; - hasRole[ADDITIONAL_ROLE_2][defaultAdmin_] = true; + hasRole[MINTER_ROLE][defaultAdmin_] = true; + hasRole[PAUSER_ROLE][defaultAdmin_] = true; } function grantRole(bytes32 role, address account) public { diff --git a/test/auth/interfaces/IAccessControlExtended.sol b/test/auth/interfaces/IAccessControlExtended.sol index 43ab351b..5dd66f79 100644 --- a/test/auth/interfaces/IAccessControlExtended.sol +++ b/test/auth/interfaces/IAccessControlExtended.sol @@ -7,9 +7,9 @@ import {IAccessControl} from "openzeppelin/access/IAccessControl.sol"; interface IAccessControlExtended is IERC165, IAccessControl { function DEFAULT_ADMIN_ROLE() external pure returns (bytes32); - function ADDITIONAL_ROLE_1() external pure returns (bytes32); + function MINTER_ROLE() external pure returns (bytes32); - function ADDITIONAL_ROLE_2() external pure returns (bytes32); + function PAUSER_ROLE() external pure returns (bytes32); function set_role_admin(bytes32 role, bytes32 adminRole) external; } From da44739334423511fb527fec16eed7610f6a9c51 Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Mon, 25 Mar 2024 15:41:58 +0100 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=93=96=20Amend=20Comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- src/snekmate/auth/mocks/AccessControlMock.vy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snekmate/auth/mocks/AccessControlMock.vy b/src/snekmate/auth/mocks/AccessControlMock.vy index 69919f60..a2afca8d 100644 --- a/src/snekmate/auth/mocks/AccessControlMock.vy +++ b/src/snekmate/auth/mocks/AccessControlMock.vy @@ -25,11 +25,11 @@ from .. import AccessControl as ac initializes: ac -# @dev An additional 32-byte access role. +# @dev The 32-byte minter role. MINTER_ROLE: public(constant(bytes32)) = keccak256("MINTER_ROLE") -# @dev An additional 32-byte access role. +# @dev The 32-byte pauser role. PAUSER_ROLE: public(constant(bytes32)) = keccak256("PAUSER_ROLE")