From e0e9ff05d8aa5c7c48465511f85a6efdf5d5c30d Mon Sep 17 00:00:00 2001 From: Eugenio Date: Wed, 25 Oct 2023 21:14:01 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20CREATE3:=20allow=20predicting=20ext?= =?UTF-8?q?ernal=20deployers=20(#396)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gas-snapshot | 243 +++++++++++++++++++++-------------------- src/test/CREATE3.t.sol | 27 ++++- src/utils/CREATE3.sol | 6 +- 3 files changed, 153 insertions(+), 123 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index dd633870..f4fa5fc6 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,6 +1,6 @@ AuthTest:testCallFunctionAsOwner() (gas: 29784) AuthTest:testCallFunctionWithPermissiveAuthority() (gas: 124292) -AuthTest:testCallFunctionWithPermissiveAuthority(address) (runs: 256, μ: 129216, ~: 129235) +AuthTest:testCallFunctionWithPermissiveAuthority(address) (runs: 256, μ: 129235, ~: 129235) AuthTest:testFailCallFunctionAsNonOwner() (gas: 15523) AuthTest:testFailCallFunctionAsNonOwner(address) (runs: 256, μ: 15685, ~: 15685) AuthTest:testFailCallFunctionAsOwnerWithOutOfOrderAuthority() (gas: 136021) @@ -17,54 +17,55 @@ AuthTest:testFailTransferOwnershipAsOwnerWithOutOfOrderAuthority(address) (runs: AuthTest:testFailTransferOwnershipWithRestrictiveAuthority() (gas: 129338) AuthTest:testFailTransferOwnershipWithRestrictiveAuthority(address,address) (runs: 256, μ: 129588, ~: 129588) AuthTest:testSetAuthorityAsOwner() (gas: 32214) -AuthTest:testSetAuthorityAsOwner(address) (runs: 256, μ: 32384, ~: 32384) +AuthTest:testSetAuthorityAsOwner(address) (runs: 256, μ: 32306, ~: 32384) AuthTest:testSetAuthorityAsOwnerWithOutOfOrderAuthority() (gas: 226419) AuthTest:testSetAuthorityWithPermissiveAuthority() (gas: 125962) -AuthTest:testSetAuthorityWithPermissiveAuthority(address,address) (runs: 256, μ: 130958, ~: 131055) +AuthTest:testSetAuthorityWithPermissiveAuthority(address,address) (runs: 256, μ: 130899, ~: 131055) AuthTest:testTransferOwnershipAsOwner() (gas: 15298) -AuthTest:testTransferOwnershipAsOwner(address) (runs: 256, μ: 15469, ~: 15469) +AuthTest:testTransferOwnershipAsOwner(address) (runs: 256, μ: 15450, ~: 15469) AuthTest:testTransferOwnershipWithPermissiveAuthority() (gas: 127926) -AuthTest:testTransferOwnershipWithPermissiveAuthority(address,address) (runs: 256, μ: 130981, ~: 131000) +AuthTest:testTransferOwnershipWithPermissiveAuthority(address,address) (runs: 256, μ: 130962, ~: 131000) Bytes32AddressLibTest:testFillLast12Bytes() (gas: 223) Bytes32AddressLibTest:testFromLast20Bytes() (gas: 191) -CREATE3Test:testDeployERC20() (gas: 853111) -CREATE3Test:testDeployERC20(bytes32,string,string,uint8) (runs: 256, μ: 923654, ~: 921961) -CREATE3Test:testFailDoubleDeployDifferentBytecode() (gas: 9079256848778914174) -CREATE3Test:testFailDoubleDeployDifferentBytecode(bytes32,bytes,bytes) (runs: 256, μ: 5062195514745832485, ~: 8937393460516727435) -CREATE3Test:testFailDoubleDeploySameBytecode() (gas: 9079256848778906218) -CREATE3Test:testFailDoubleDeploySameBytecode(bytes32,bytes) (runs: 256, μ: 5027837975401088877, ~: 8937393460516728677) +CREATE3Test:testDeployERC20() (gas: 853207) +CREATE3Test:testDeployERC20(bytes32,string,string,uint8) (runs: 256, μ: 938370, ~: 944970) +CREATE3Test:testFailDoubleDeployDifferentBytecode() (gas: 9079256848778914176) +CREATE3Test:testFailDoubleDeployDifferentBytecode(bytes32,bytes,bytes) (runs: 256, μ: 5830806919119382084, ~: 8937393460516727580) +CREATE3Test:testFailDoubleDeploySameBytecode() (gas: 9079256848778906219) +CREATE3Test:testFailDoubleDeploySameBytecode(bytes32,bytes) (runs: 256, μ: 5516047526412694750, ~: 8937393460516728714) +CREATE3Test:testPredictDeployERC20() (gas: 2102048) DSTestPlusTest:testBound() (gas: 14214) DSTestPlusTest:testBound(uint256,uint256,uint256) (runs: 256, μ: 2787, ~: 2793) DSTestPlusTest:testBrutalizeMemory() (gas: 823) DSTestPlusTest:testFailBoundMinBiggerThanMax() (gas: 309) -DSTestPlusTest:testFailBoundMinBiggerThanMax(uint256,uint256,uint256) (runs: 256, μ: 460, ~: 462) +DSTestPlusTest:testFailBoundMinBiggerThanMax(uint256,uint256,uint256) (runs: 256, μ: 460, ~: 460) DSTestPlusTest:testRelApproxEqBothZeroesPasses() (gas: 425) ERC1155Test:testApproveAll() (gas: 31009) ERC1155Test:testApproveAll(address,bool) (runs: 256, μ: 16872, ~: 11440) ERC1155Test:testBatchBalanceOf() (gas: 157631) -ERC1155Test:testBatchBalanceOf(address[],uint256[],uint256[],bytes) (runs: 256, μ: 3307946, ~: 2596398) +ERC1155Test:testBatchBalanceOf(address[],uint256[],uint256[],bytes) (runs: 256, μ: 3309878, ~: 2596398) ERC1155Test:testBatchBurn() (gas: 151074) -ERC1155Test:testBatchBurn(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 3425444, ~: 3021348) +ERC1155Test:testBatchBurn(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 3490436, ~: 3058687) ERC1155Test:testBatchMintToEOA() (gas: 137337) -ERC1155Test:testBatchMintToEOA(address,uint256[],uint256[],bytes) (runs: 256, μ: 3261893, ~: 2923515) +ERC1155Test:testBatchMintToEOA(address,uint256[],uint256[],bytes) (runs: 256, μ: 3293138, ~: 2941772) ERC1155Test:testBatchMintToERC1155Recipient() (gas: 995703) -ERC1155Test:testBatchMintToERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 7336290, ~: 6396323) +ERC1155Test:testBatchMintToERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 7395823, ~: 6396323) ERC1155Test:testBurn() (gas: 38598) -ERC1155Test:testBurn(address,uint256,uint256,bytes,uint256) (runs: 256, μ: 40221, ~: 42098) +ERC1155Test:testBurn(address,uint256,uint256,bytes,uint256) (runs: 256, μ: 40061, ~: 42098) ERC1155Test:testFailBalanceOfBatchWithArrayMismatch() (gas: 7933) ERC1155Test:testFailBalanceOfBatchWithArrayMismatch(address[],uint256[]) (runs: 256, μ: 53386, ~: 54066) ERC1155Test:testFailBatchBurnInsufficientBalance() (gas: 136156) -ERC1155Test:testFailBatchBurnInsufficientBalance(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 1278568, ~: 440335) +ERC1155Test:testFailBatchBurnInsufficientBalance(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 1301377, ~: 440335) ERC1155Test:testFailBatchBurnWithArrayLengthMismatch() (gas: 135542) ERC1155Test:testFailBatchBurnWithArrayLengthMismatch(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 77137, ~: 78751) ERC1155Test:testFailBatchMintToNonERC1155Recipient() (gas: 167292) -ERC1155Test:testFailBatchMintToNonERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 3131966, ~: 2673077) +ERC1155Test:testFailBatchMintToNonERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 3190100, ~: 2673077) ERC1155Test:testFailBatchMintToRevertingERC1155Recipient() (gas: 358811) -ERC1155Test:testFailBatchMintToRevertingERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 3323504, ~: 2864613) +ERC1155Test:testFailBatchMintToRevertingERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 3381638, ~: 2864613) ERC1155Test:testFailBatchMintToWrongReturnDataERC1155Recipient() (gas: 310743) -ERC1155Test:testFailBatchMintToWrongReturnDataERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 3275462, ~: 2816572) +ERC1155Test:testFailBatchMintToWrongReturnDataERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 3333596, ~: 2816572) ERC1155Test:testFailBatchMintToZero() (gas: 131737) -ERC1155Test:testFailBatchMintToZero(uint256[],uint256[],bytes) (runs: 256, μ: 3072466, ~: 2612336) +ERC1155Test:testFailBatchMintToZero(uint256[],uint256[],bytes) (runs: 256, μ: 3130600, ~: 2612336) ERC1155Test:testFailBatchMintWithArrayMismatch() (gas: 9600) ERC1155Test:testFailBatchMintWithArrayMismatch(address,uint256[],uint256[],bytes) (runs: 256, μ: 69252, ~: 68809) ERC1155Test:testFailBurnInsufficientBalance() (gas: 34852) @@ -78,58 +79,58 @@ ERC1155Test:testFailMintToWrongReturnDataERC155Recipient(uint256,uint256,bytes) ERC1155Test:testFailMintToZero() (gas: 33705) ERC1155Test:testFailMintToZero(uint256,uint256,bytes) (runs: 256, μ: 33815, ~: 34546) ERC1155Test:testFailSafeBatchTransferFromToNonERC1155Recipient() (gas: 321377) -ERC1155Test:testFailSafeBatchTransferFromToNonERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3490437, ~: 2963551) +ERC1155Test:testFailSafeBatchTransferFromToNonERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3541296, ~: 2963551) ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient() (gas: 512956) -ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3681974, ~: 3155082) +ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3732833, ~: 3155082) ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() (gas: 464847) -ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3633892, ~: 3107003) +ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3684751, ~: 3107003) ERC1155Test:testFailSafeBatchTransferFromToZero() (gas: 286556) -ERC1155Test:testFailSafeBatchTransferFromToZero(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3455257, ~: 2928396) +ERC1155Test:testFailSafeBatchTransferFromToZero(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3505805, ~: 2928396) ERC1155Test:testFailSafeBatchTransferFromWithArrayLengthMismatch() (gas: 162674) ERC1155Test:testFailSafeBatchTransferFromWithArrayLengthMismatch(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 81184, ~: 82042) ERC1155Test:testFailSafeBatchTransferInsufficientBalance() (gas: 163555) -ERC1155Test:testFailSafeBatchTransferInsufficientBalance(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 1497154, ~: 499517) +ERC1155Test:testFailSafeBatchTransferInsufficientBalance(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 1528922, ~: 499517) ERC1155Test:testFailSafeTransferFromInsufficientBalance() (gas: 63245) ERC1155Test:testFailSafeTransferFromInsufficientBalance(address,uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 63986, ~: 67405) ERC1155Test:testFailSafeTransferFromSelfInsufficientBalance() (gas: 34297) ERC1155Test:testFailSafeTransferFromSelfInsufficientBalance(address,uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 36266, ~: 38512) ERC1155Test:testFailSafeTransferFromToNonERC155Recipient() (gas: 96510) -ERC1155Test:testFailSafeTransferFromToNonERC155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 96580, ~: 100546) +ERC1155Test:testFailSafeTransferFromToNonERC155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 96657, ~: 100546) ERC1155Test:testFailSafeTransferFromToRevertingERC1155Recipient() (gas: 287731) -ERC1155Test:testFailSafeTransferFromToRevertingERC1155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 287750, ~: 291719) +ERC1155Test:testFailSafeTransferFromToRevertingERC1155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 287828, ~: 291719) ERC1155Test:testFailSafeTransferFromToWrongReturnDataERC1155Recipient() (gas: 239587) -ERC1155Test:testFailSafeTransferFromToWrongReturnDataERC1155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 239629, ~: 243598) +ERC1155Test:testFailSafeTransferFromToWrongReturnDataERC1155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 239707, ~: 243598) ERC1155Test:testFailSafeTransferFromToZero() (gas: 62014) -ERC1155Test:testFailSafeTransferFromToZero(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 62068, ~: 66037) +ERC1155Test:testFailSafeTransferFromToZero(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 62146, ~: 66037) ERC1155Test:testMintToEOA() (gas: 34765) -ERC1155Test:testMintToEOA(address,uint256,uint256,bytes) (runs: 256, μ: 35426, ~: 35907) +ERC1155Test:testMintToEOA(address,uint256,uint256,bytes) (runs: 256, μ: 35562, ~: 35907) ERC1155Test:testMintToERC1155Recipient() (gas: 661411) ERC1155Test:testMintToERC1155Recipient(uint256,uint256,bytes) (runs: 256, μ: 691094, ~: 684374) ERC1155Test:testSafeBatchTransferFromToEOA() (gas: 297822) -ERC1155Test:testSafeBatchTransferFromToEOA(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 4692589, ~: 3776319) +ERC1155Test:testSafeBatchTransferFromToEOA(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 4801633, ~: 3787204) ERC1155Test:testSafeBatchTransferFromToERC1155Recipient() (gas: 1175327) -ERC1155Test:testSafeBatchTransferFromToERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 7683519, ~: 6515438) +ERC1155Test:testSafeBatchTransferFromToERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 7759541, ~: 6618414) ERC1155Test:testSafeTransferFromSelf() (gas: 64177) -ERC1155Test:testSafeTransferFromSelf(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 64824, ~: 68564) +ERC1155Test:testSafeTransferFromSelf(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 64552, ~: 68564) ERC1155Test:testSafeTransferFromToEOA() (gas: 93167) -ERC1155Test:testSafeTransferFromToEOA(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 93578, ~: 97450) +ERC1155Test:testSafeTransferFromToEOA(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 92808, ~: 97450) ERC1155Test:testSafeTransferFromToERC1155Recipient() (gas: 739583) -ERC1155Test:testSafeTransferFromToERC1155Recipient(uint256,uint256,bytes,uint256,bytes) (runs: 256, μ: 769591, ~: 765729) -ERC20Invariants:invariantBalanceSum() (runs: 256, calls: 3840, reverts: 2388) -ERC20Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2610) +ERC1155Test:testSafeTransferFromToERC1155Recipient(uint256,uint256,bytes,uint256,bytes) (runs: 256, μ: 769513, ~: 765729) +ERC20Invariants:invariantBalanceSum() (runs: 256, calls: 3840, reverts: 2369) +ERC20Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2537) ERC20Test:testApprove() (gas: 31058) ERC20Test:testApprove(address,uint256) (runs: 256, μ: 30424, ~: 31280) ERC20Test:testBurn() (gas: 56970) ERC20Test:testBurn(address,uint256,uint256) (runs: 256, μ: 56678, ~: 59645) ERC20Test:testFailBurnInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 51897, ~: 55492) ERC20Test:testFailPermitBadDeadline() (gas: 36935) -ERC20Test:testFailPermitBadDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 32148, ~: 37218) +ERC20Test:testFailPermitBadDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 32016, ~: 37218) ERC20Test:testFailPermitBadNonce() (gas: 36874) -ERC20Test:testFailPermitBadNonce(uint256,address,uint256,uint256,uint256) (runs: 256, μ: 31628, ~: 37187) +ERC20Test:testFailPermitBadNonce(uint256,address,uint256,uint256,uint256) (runs: 256, μ: 31497, ~: 37187) ERC20Test:testFailPermitPastDeadline() (gas: 11191) -ERC20Test:testFailPermitPastDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 12037, ~: 13101) +ERC20Test:testFailPermitPastDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 12007, ~: 13101) ERC20Test:testFailPermitReplay() (gas: 66274) -ERC20Test:testFailPermitReplay(uint256,address,uint256,uint256) (runs: 256, μ: 57071, ~: 66592) +ERC20Test:testFailPermitReplay(uint256,address,uint256,uint256) (runs: 256, μ: 56825, ~: 66592) ERC20Test:testFailTransferFromInsufficientAllowance() (gas: 80882) ERC20Test:testFailTransferFromInsufficientAllowance(address,uint256,uint256) (runs: 256, μ: 79858, ~: 83393) ERC20Test:testFailTransferFromInsufficientBalance() (gas: 81358) @@ -137,7 +138,7 @@ ERC20Test:testFailTransferFromInsufficientBalance(address,uint256,uint256) (runs ERC20Test:testFailTransferInsufficientBalance() (gas: 52806) ERC20Test:testFailTransferInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 51720, ~: 55310) ERC20Test:testInfiniteApproveTransferFrom() (gas: 89793) -ERC20Test:testMetadata(string,string,uint8) (runs: 256, μ: 869043, ~: 863173) +ERC20Test:testMetadata(string,string,uint8) (runs: 256, μ: 870921, ~: 863565) ERC20Test:testMint() (gas: 53746) ERC20Test:testMint(address,uint256) (runs: 256, μ: 52214, ~: 53925) ERC20Test:testPermit() (gas: 63193) @@ -145,8 +146,8 @@ ERC20Test:testPermit(uint248,address,uint256,uint256) (runs: 256, μ: 62584, ~: ERC20Test:testTransfer() (gas: 60272) ERC20Test:testTransfer(address,uint256) (runs: 256, μ: 58773, ~: 60484) ERC20Test:testTransferFrom() (gas: 83777) -ERC20Test:testTransferFrom(address,uint256,uint256) (runs: 256, μ: 86308, ~: 92841) -ERC4626Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2901) +ERC20Test:testTransferFrom(address,uint256,uint256) (runs: 256, μ: 86464, ~: 92841) +ERC4626Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2951) ERC4626Test:testFailDepositWithNoApproval() (gas: 13369) ERC4626Test:testFailDepositWithNotEnoughApproval() (gas: 87005) ERC4626Test:testFailDepositZero() (gas: 7780) @@ -156,17 +157,17 @@ ERC4626Test:testFailRedeemWithNotEnoughShareAmount() (gas: 203643) ERC4626Test:testFailRedeemZero() (gas: 7967) ERC4626Test:testFailWithdrawWithNoUnderlyingAmount() (gas: 32289) ERC4626Test:testFailWithdrawWithNotEnoughUnderlyingAmount() (gas: 203607) -ERC4626Test:testMetadata(string,string) (runs: 256, μ: 1503475, ~: 1494729) +ERC4626Test:testMetadata(string,string) (runs: 256, μ: 1506515, ~: 1495306) ERC4626Test:testMintZero() (gas: 54607) ERC4626Test:testMultipleMintDepositRedeemWithdraw() (gas: 411804) -ERC4626Test:testSingleDepositWithdraw(uint128) (runs: 256, μ: 201540, ~: 201550) -ERC4626Test:testSingleMintRedeem(uint128) (runs: 256, μ: 201466, ~: 201476) +ERC4626Test:testSingleDepositWithdraw(uint128) (runs: 256, μ: 201539, ~: 201550) +ERC4626Test:testSingleMintRedeem(uint128) (runs: 256, μ: 201465, ~: 201476) ERC4626Test:testVaultInteractionsForSomeoneElse() (gas: 286238) ERC4626Test:testWithdrawZero() (gas: 52468) ERC6909Test:testApprove() (gas: 31594) ERC6909Test:testApprove(address,uint256,uint256) (runs: 256, μ: 30905, ~: 31838) ERC6909Test:testBurn() (gas: 58826) -ERC6909Test:testBurn(address,uint256,uint256) (runs: 256, μ: 41756, ~: 42866) +ERC6909Test:testBurn(address,uint256,uint256) (runs: 256, μ: 41740, ~: 42852) ERC6909Test:testFailMint() (gas: 53818) ERC6909Test:testFailTransfer() (gas: 10823) ERC6909Test:testFailTransfer(address,address,uint256,uint256) (runs: 256, μ: 13203, ~: 13203) @@ -177,26 +178,26 @@ ERC6909Test:testFailTransferFromNotAuthorized(address,address,uint256,uint256) ( ERC6909Test:testMint() (gas: 54775) ERC6909Test:testMint(address,uint256,uint256) (runs: 256, μ: 53101, ~: 54967) ERC6909Test:testSetOperator() (gas: 31115) -ERC6909Test:testSetOperator(address,bool) (runs: 256, μ: 17028, ~: 11596) +ERC6909Test:testSetOperator(address,bool) (runs: 256, μ: 17106, ~: 11596) ERC6909Test:testTransfer() (gas: 83929) -ERC6909Test:testTransfer(address,address,uint256,uint256,uint256) (runs: 256, μ: 82007, ~: 86605) +ERC6909Test:testTransfer(address,address,uint256,uint256,uint256) (runs: 256, μ: 82241, ~: 86605) ERC6909Test:testTransferFromAsOperator() (gas: 109473) -ERC6909Test:testTransferFromAsOperator(address,address,uint256,uint256,uint256) (runs: 256, μ: 107546, ~: 112144) +ERC6909Test:testTransferFromAsOperator(address,address,uint256,uint256,uint256) (runs: 256, μ: 107780, ~: 112144) ERC6909Test:testTransferFromWithApproval() (gas: 114030) -ERC6909Test:testTransferFromWithApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 111172, ~: 116749) +ERC6909Test:testTransferFromWithApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 111484, ~: 116749) ERC6909Test:testTransferFromWithInfiniteApproval() (gas: 113593) -ERC6909Test:testTransferFromWithInfiniteApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 111693, ~: 116291) -ERC721Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2183) +ERC6909Test:testTransferFromWithInfiniteApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 111927, ~: 116291) +ERC721Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2156) ERC721Test:testApprove() (gas: 78427) ERC721Test:testApprove(address,uint256) (runs: 256, μ: 78637, ~: 78637) ERC721Test:testApproveAll() (gas: 31063) -ERC721Test:testApproveAll(address,bool) (runs: 256, μ: 16970, ~: 11538) +ERC721Test:testApproveAll(address,bool) (runs: 256, μ: 17048, ~: 11538) ERC721Test:testApproveBurn() (gas: 65550) -ERC721Test:testApproveBurn(address,uint256) (runs: 256, μ: 65613, ~: 65624) +ERC721Test:testApproveBurn(address,uint256) (runs: 256, μ: 65422, ~: 65619) ERC721Test:testBurn() (gas: 46107) -ERC721Test:testBurn(address,uint256) (runs: 256, μ: 46152, ~: 46163) +ERC721Test:testBurn(address,uint256) (runs: 256, μ: 46147, ~: 46157) ERC721Test:testFailApproveUnAuthorized() (gas: 55598) -ERC721Test:testFailApproveUnAuthorized(address,uint256,address) (runs: 256, μ: 55873, ~: 55873) +ERC721Test:testFailApproveUnAuthorized(address,uint256,address) (runs: 256, μ: 55872, ~: 55873) ERC721Test:testFailApproveUnMinted() (gas: 10236) ERC721Test:testFailApproveUnMinted(uint256,address) (runs: 256, μ: 10363, ~: 10363) ERC721Test:testFailBalanceOfZeroAddress() (gas: 5555) @@ -235,75 +236,75 @@ ERC721Test:testFailSafeTransferFromToRevertingERC721Recipient(uint256) (runs: 25 ERC721Test:testFailSafeTransferFromToRevertingERC721RecipientWithData() (gas: 233396) ERC721Test:testFailSafeTransferFromToRevertingERC721RecipientWithData(uint256,bytes) (runs: 256, μ: 233823, ~: 233819) ERC721Test:testFailTransferFromNotOwner() (gas: 57872) -ERC721Test:testFailTransferFromNotOwner(address,address,uint256) (runs: 256, μ: 57515, ~: 58162) +ERC721Test:testFailTransferFromNotOwner(address,address,uint256) (runs: 256, μ: 57905, ~: 58162) ERC721Test:testFailTransferFromToZero() (gas: 53381) ERC721Test:testFailTransferFromToZero(uint256) (runs: 256, μ: 53463, ~: 53463) ERC721Test:testFailTransferFromUnOwned() (gas: 8000) -ERC721Test:testFailTransferFromUnOwned(address,address,uint256) (runs: 256, μ: 8311, ~: 8241) +ERC721Test:testFailTransferFromUnOwned(address,address,uint256) (runs: 256, μ: 8294, ~: 8241) ERC721Test:testFailTransferFromWrongFrom() (gas: 53361) ERC721Test:testFailTransferFromWrongFrom(address,address,address,uint256) (runs: 256, μ: 53566, ~: 53752) -ERC721Test:testMetadata(string,string) (runs: 256, μ: 1341878, ~: 1332786) +ERC721Test:testMetadata(string,string) (runs: 256, μ: 1344402, ~: 1332786) ERC721Test:testMint() (gas: 54336) ERC721Test:testMint(address,uint256) (runs: 256, μ: 54521, ~: 54521) ERC721Test:testSafeMintToEOA() (gas: 56993) -ERC721Test:testSafeMintToEOA(uint256,address) (runs: 256, μ: 56976, ~: 57421) +ERC721Test:testSafeMintToEOA(uint256,address) (runs: 256, μ: 56764, ~: 57421) ERC721Test:testSafeMintToERC721Recipient() (gas: 427035) ERC721Test:testSafeMintToERC721Recipient(uint256) (runs: 256, μ: 426053, ~: 427142) ERC721Test:testSafeMintToERC721RecipientWithData() (gas: 448149) ERC721Test:testSafeMintToERC721RecipientWithData(uint256,bytes) (runs: 256, μ: 480015, ~: 470905) ERC721Test:testSafeTransferFromToEOA() (gas: 95666) -ERC721Test:testSafeTransferFromToEOA(uint256,address) (runs: 256, μ: 95352, ~: 96099) +ERC721Test:testSafeTransferFromToEOA(uint256,address) (runs: 256, μ: 95735, ~: 96099) ERC721Test:testSafeTransferFromToERC721Recipient() (gas: 485549) ERC721Test:testSafeTransferFromToERC721Recipient(uint256) (runs: 256, μ: 484593, ~: 485682) ERC721Test:testSafeTransferFromToERC721RecipientWithData() (gas: 506317) ERC721Test:testSafeTransferFromToERC721RecipientWithData(uint256,bytes) (runs: 256, μ: 538126, ~: 529082) ERC721Test:testTransferFrom() (gas: 86347) -ERC721Test:testTransferFrom(uint256,address) (runs: 256, μ: 86469, ~: 86477) +ERC721Test:testTransferFrom(uint256,address) (runs: 256, μ: 86459, ~: 86468) ERC721Test:testTransferFromApproveAll() (gas: 92898) -ERC721Test:testTransferFromApproveAll(uint256,address) (runs: 256, μ: 93182, ~: 93182) +ERC721Test:testTransferFromApproveAll(uint256,address) (runs: 256, μ: 93181, ~: 93182) ERC721Test:testTransferFromSelf() (gas: 64776) -ERC721Test:testTransferFromSelf(uint256,address) (runs: 256, μ: 65061, ~: 65061) -FixedPointMathLibTest:testDifferentiallyFuzzSqrt(uint256) (runs: 256, μ: 13809, ~: 4181) +ERC721Test:testTransferFromSelf(uint256,address) (runs: 256, μ: 65060, ~: 65061) +FixedPointMathLibTest:testDifferentiallyFuzzSqrt(uint256) (runs: 256, μ: 13872, ~: 6222) FixedPointMathLibTest:testDivWadDown() (gas: 820) -FixedPointMathLibTest:testDivWadDown(uint256,uint256) (runs: 256, μ: 712, ~: 813) +FixedPointMathLibTest:testDivWadDown(uint256,uint256) (runs: 256, μ: 716, ~: 813) FixedPointMathLibTest:testDivWadDownEdgeCases() (gas: 439) FixedPointMathLibTest:testDivWadUp() (gas: 943) -FixedPointMathLibTest:testDivWadUp(uint256,uint256) (runs: 256, μ: 792, ~: 952) +FixedPointMathLibTest:testDivWadUp(uint256,uint256) (runs: 256, μ: 799, ~: 952) FixedPointMathLibTest:testDivWadUpEdgeCases() (gas: 442) -FixedPointMathLibTest:testFailDivWadDownOverflow(uint256,uint256) (runs: 256, μ: 442, ~: 419) +FixedPointMathLibTest:testFailDivWadDownOverflow(uint256,uint256) (runs: 256, μ: 440, ~: 419) FixedPointMathLibTest:testFailDivWadDownZeroDenominator() (gas: 332) FixedPointMathLibTest:testFailDivWadDownZeroDenominator(uint256) (runs: 256, μ: 387, ~: 387) -FixedPointMathLibTest:testFailDivWadUpOverflow(uint256,uint256) (runs: 256, μ: 397, ~: 374) +FixedPointMathLibTest:testFailDivWadUpOverflow(uint256,uint256) (runs: 256, μ: 395, ~: 374) FixedPointMathLibTest:testFailDivWadUpZeroDenominator() (gas: 332) FixedPointMathLibTest:testFailDivWadUpZeroDenominator(uint256) (runs: 256, μ: 386, ~: 386) -FixedPointMathLibTest:testFailMulDivDownOverflow(uint256,uint256,uint256) (runs: 256, μ: 434, ~: 414) +FixedPointMathLibTest:testFailMulDivDownOverflow(uint256,uint256,uint256) (runs: 256, μ: 436, ~: 414) FixedPointMathLibTest:testFailMulDivDownZeroDenominator() (gas: 328) FixedPointMathLibTest:testFailMulDivDownZeroDenominator(uint256,uint256) (runs: 256, μ: 385, ~: 385) -FixedPointMathLibTest:testFailMulDivUpOverflow(uint256,uint256,uint256) (runs: 256, μ: 457, ~: 437) +FixedPointMathLibTest:testFailMulDivUpOverflow(uint256,uint256,uint256) (runs: 256, μ: 459, ~: 437) FixedPointMathLibTest:testFailMulDivUpZeroDenominator() (gas: 329) FixedPointMathLibTest:testFailMulDivUpZeroDenominator(uint256,uint256) (runs: 256, μ: 428, ~: 428) -FixedPointMathLibTest:testFailMulWadDownOverflow(uint256,uint256) (runs: 256, μ: 421, ~: 387) -FixedPointMathLibTest:testFailMulWadUpOverflow(uint256,uint256) (runs: 256, μ: 398, ~: 364) +FixedPointMathLibTest:testFailMulWadDownOverflow(uint256,uint256) (runs: 256, μ: 419, ~: 387) +FixedPointMathLibTest:testFailMulWadUpOverflow(uint256,uint256) (runs: 256, μ: 396, ~: 364) FixedPointMathLibTest:testMulDivDown() (gas: 1813) -FixedPointMathLibTest:testMulDivDown(uint256,uint256,uint256) (runs: 256, μ: 686, ~: 786) +FixedPointMathLibTest:testMulDivDown(uint256,uint256,uint256) (runs: 256, μ: 680, ~: 786) FixedPointMathLibTest:testMulDivDownEdgeCases() (gas: 686) FixedPointMathLibTest:testMulDivUp() (gas: 2095) -FixedPointMathLibTest:testMulDivUp(uint256,uint256,uint256) (runs: 256, μ: 821, ~: 1034) +FixedPointMathLibTest:testMulDivUp(uint256,uint256,uint256) (runs: 256, μ: 810, ~: 1034) FixedPointMathLibTest:testMulDivUpEdgeCases() (gas: 785) FixedPointMathLibTest:testMulWadDown() (gas: 823) -FixedPointMathLibTest:testMulWadDown(uint256,uint256) (runs: 256, μ: 681, ~: 803) +FixedPointMathLibTest:testMulWadDown(uint256,uint256) (runs: 256, μ: 688, ~: 803) FixedPointMathLibTest:testMulWadDownEdgeCases() (gas: 822) FixedPointMathLibTest:testMulWadUp() (gas: 921) -FixedPointMathLibTest:testMulWadUp(uint256,uint256) (runs: 256, μ: 821, ~: 1053) +FixedPointMathLibTest:testMulWadUp(uint256,uint256) (runs: 256, μ: 834, ~: 1053) FixedPointMathLibTest:testMulWadUpEdgeCases() (gas: 899) FixedPointMathLibTest:testRPow() (gas: 2164) FixedPointMathLibTest:testSqrt() (gas: 2580) FixedPointMathLibTest:testSqrt(uint256) (runs: 256, μ: 997, ~: 1013) -FixedPointMathLibTest:testSqrtBack(uint256) (runs: 256, μ: 15210, ~: 340) -FixedPointMathLibTest:testSqrtBackHashed(uint256) (runs: 256, μ: 59066, ~: 59500) +FixedPointMathLibTest:testSqrtBack(uint256) (runs: 256, μ: 14998, ~: 340) +FixedPointMathLibTest:testSqrtBackHashed(uint256) (runs: 256, μ: 59001, ~: 59500) FixedPointMathLibTest:testSqrtBackHashedSingle() (gas: 58937) -LibStringTest:testDifferentiallyFuzzToString(uint256,bytes) (runs: 256, μ: 20892, ~: 8988) -LibStringTest:testDifferentiallyFuzzToStringInt(int256,bytes) (runs: 256, μ: 20081, ~: 8356) +LibStringTest:testDifferentiallyFuzzToString(uint256,bytes) (runs: 256, μ: 20460, ~: 7749) +LibStringTest:testDifferentiallyFuzzToStringInt(int256,bytes) (runs: 256, μ: 20610, ~: 8980) LibStringTest:testToString() (gas: 10069) LibStringTest:testToStringDirty() (gas: 8145) LibStringTest:testToStringIntNegative() (gas: 9634) @@ -314,48 +315,48 @@ MerkleProofLibTest:testVerifyEmptyMerkleProofSuppliedLeafAndRootDifferent() (gas MerkleProofLibTest:testVerifyEmptyMerkleProofSuppliedLeafAndRootSame() (gas: 1452) MerkleProofLibTest:testVerifyInvalidProofSupplied() (gas: 2172) MultiRolesAuthorityTest:testCanCallPublicCapability() (gas: 34204) -MultiRolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 34390, ~: 34361) +MultiRolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 34387, ~: 34364) MultiRolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 80416) -MultiRolesAuthorityTest:testCanCallWithAuthorizedRole(address,uint8,address,bytes4) (runs: 256, μ: 80705, ~: 80671) +MultiRolesAuthorityTest:testCanCallWithAuthorizedRole(address,uint8,address,bytes4) (runs: 256, μ: 80702, ~: 80671) MultiRolesAuthorityTest:testCanCallWithCustomAuthority() (gas: 422439) MultiRolesAuthorityTest:testCanCallWithCustomAuthority(address,address,bytes4) (runs: 256, μ: 422858, ~: 422858) MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesPublicCapability() (gas: 247388) MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesPublicCapability(address,address,bytes4) (runs: 256, μ: 247841, ~: 247841) MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesUserWithRole() (gas: 256546) -MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesUserWithRole(address,uint8,address,bytes4) (runs: 256, μ: 256885, ~: 256852) +MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesUserWithRole(address,uint8,address,bytes4) (runs: 256, μ: 256878, ~: 256852) MultiRolesAuthorityTest:testSetPublicCapabilities() (gas: 27727) MultiRolesAuthorityTest:testSetPublicCapabilities(bytes4) (runs: 256, μ: 27836, ~: 27835) MultiRolesAuthorityTest:testSetRoleCapabilities() (gas: 28932) -MultiRolesAuthorityTest:testSetRoleCapabilities(uint8,bytes4) (runs: 256, μ: 29073, ~: 29073) +MultiRolesAuthorityTest:testSetRoleCapabilities(uint8,bytes4) (runs: 256, μ: 29073, ~: 29072) MultiRolesAuthorityTest:testSetRoles() (gas: 28918) -MultiRolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29030, ~: 29016) +MultiRolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29026, ~: 29014) MultiRolesAuthorityTest:testSetTargetCustomAuthority() (gas: 28102) -MultiRolesAuthorityTest:testSetTargetCustomAuthority(address,address) (runs: 256, μ: 28176, ~: 28146) +MultiRolesAuthorityTest:testSetTargetCustomAuthority(address,address) (runs: 256, μ: 28113, ~: 28146) OwnedTest:testCallFunctionAsNonOwner() (gas: 11344) OwnedTest:testCallFunctionAsNonOwner(address) (runs: 256, μ: 16252, ~: 16290) OwnedTest:testCallFunctionAsOwner() (gas: 10435) OwnedTest:testTransferOwnership() (gas: 13123) OwnedTest:testTransferOwnership(address) (runs: 256, μ: 13154, ~: 13192) -ReentrancyGuardTest:invariantReentrancyStatusAlways1() (runs: 256, calls: 3840, reverts: 266) +ReentrancyGuardTest:invariantReentrancyStatusAlways1() (runs: 256, calls: 3840, reverts: 282) ReentrancyGuardTest:testFailUnprotectedCall() (gas: 46147) ReentrancyGuardTest:testNoReentrancy() (gas: 7515) ReentrancyGuardTest:testProtectedCall() (gas: 33467) RolesAuthorityTest:testCanCallPublicCapability() (gas: 33409) -RolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 33560, ~: 33532) +RolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 33558, ~: 33534) RolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 79995) -RolesAuthorityTest:testCanCallWithAuthorizedRole(address,uint8,address,bytes4) (runs: 256, μ: 80272, ~: 80238) +RolesAuthorityTest:testCanCallWithAuthorizedRole(address,uint8,address,bytes4) (runs: 256, μ: 80265, ~: 80238) RolesAuthorityTest:testSetPublicCapabilities() (gas: 29095) -RolesAuthorityTest:testSetPublicCapabilities(address,bytes4) (runs: 256, μ: 29209, ~: 29192) +RolesAuthorityTest:testSetPublicCapabilities(address,bytes4) (runs: 256, μ: 29206, ~: 29192) RolesAuthorityTest:testSetRoleCapabilities() (gas: 30276) -RolesAuthorityTest:testSetRoleCapabilities(uint8,address,bytes4) (runs: 256, μ: 30506, ~: 30489) +RolesAuthorityTest:testSetRoleCapabilities(uint8,address,bytes4) (runs: 256, μ: 30503, ~: 30489) RolesAuthorityTest:testSetRoles() (gas: 29005) -RolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29122, ~: 29108) +RolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29119, ~: 29106) SSTORE2Test:testFailReadInvalidPointer() (gas: 2927) SSTORE2Test:testFailReadInvalidPointer(address,bytes) (runs: 256, μ: 3889, ~: 3892) SSTORE2Test:testFailReadInvalidPointerCustomBounds() (gas: 3099) -SSTORE2Test:testFailReadInvalidPointerCustomBounds(address,uint256,uint256,bytes) (runs: 256, μ: 4107, ~: 4130) +SSTORE2Test:testFailReadInvalidPointerCustomBounds(address,uint256,uint256,bytes) (runs: 256, μ: 4111, ~: 4130) SSTORE2Test:testFailReadInvalidPointerCustomStartBound() (gas: 3004) -SSTORE2Test:testFailReadInvalidPointerCustomStartBound(address,uint256,bytes) (runs: 256, μ: 3980, ~: 3988) +SSTORE2Test:testFailReadInvalidPointerCustomStartBound(address,uint256,bytes) (runs: 256, μ: 3950, ~: 3988) SSTORE2Test:testFailWriteReadCustomBoundsOutOfRange(bytes,uint256,uint256,bytes) (runs: 256, μ: 46236, ~: 43603) SSTORE2Test:testFailWriteReadCustomStartBoundOutOfRange(bytes,uint256,bytes) (runs: 256, μ: 46017, ~: 43452) SSTORE2Test:testFailWriteReadEmptyOutOfBounds() (gas: 34470) @@ -364,9 +365,9 @@ SSTORE2Test:testFailWriteReadOutOfStartBound() (gas: 34362) SSTORE2Test:testWriteRead() (gas: 53497) SSTORE2Test:testWriteRead(bytes,bytes) (runs: 256, μ: 44019, ~: 41555) SSTORE2Test:testWriteReadCustomBounds() (gas: 34869) -SSTORE2Test:testWriteReadCustomBounds(bytes,uint256,uint256,bytes) (runs: 256, μ: 29483, ~: 44592) +SSTORE2Test:testWriteReadCustomBounds(bytes,uint256,uint256,bytes) (runs: 256, μ: 28690, ~: 42377) SSTORE2Test:testWriteReadCustomStartBound() (gas: 34740) -SSTORE2Test:testWriteReadCustomStartBound(bytes,uint256,bytes) (runs: 256, μ: 46484, ~: 44053) +SSTORE2Test:testWriteReadCustomStartBound(bytes,uint256,bytes) (runs: 256, μ: 46485, ~: 44053) SSTORE2Test:testWriteReadEmptyBound() (gas: 34677) SSTORE2Test:testWriteReadFullBoundedRead() (gas: 53672) SSTORE2Test:testWriteReadFullStartBound() (gas: 34764) @@ -491,16 +492,16 @@ SafeCastLibTest:testSafeCastTo80(uint256) (runs: 256, μ: 2736, ~: 2736) SafeCastLibTest:testSafeCastTo88(uint256) (runs: 256, μ: 2755, ~: 2755) SafeCastLibTest:testSafeCastTo96() (gas: 536) SafeCastLibTest:testSafeCastTo96(uint256) (runs: 256, μ: 2800, ~: 2800) -SafeTransferLibTest:testApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 2664, ~: 2231) +SafeTransferLibTest:testApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 2684, ~: 2231) SafeTransferLibTest:testApproveWithMissingReturn() (gas: 30757) SafeTransferLibTest:testApproveWithMissingReturn(address,uint256,bytes) (runs: 256, μ: 30334, ~: 31572) SafeTransferLibTest:testApproveWithNonContract() (gas: 3041) -SafeTransferLibTest:testApproveWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4127, ~: 4123) +SafeTransferLibTest:testApproveWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4128, ~: 4123) SafeTransferLibTest:testApproveWithReturnsTooMuch() (gas: 31140) SafeTransferLibTest:testApproveWithReturnsTooMuch(address,uint256,bytes) (runs: 256, μ: 30802, ~: 32040) SafeTransferLibTest:testApproveWithStandardERC20() (gas: 30888) SafeTransferLibTest:testApproveWithStandardERC20(address,uint256,bytes) (runs: 256, μ: 30528, ~: 31766) -SafeTransferLibTest:testFailApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 84443, ~: 77915) +SafeTransferLibTest:testFailApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 83705, ~: 77915) SafeTransferLibTest:testFailApproveWithReturnsFalse() (gas: 5633) SafeTransferLibTest:testFailApproveWithReturnsFalse(address,uint256,bytes) (runs: 256, μ: 6486, ~: 6481) SafeTransferLibTest:testFailApproveWithReturnsTooLittle() (gas: 5574) @@ -510,7 +511,7 @@ SafeTransferLibTest:testFailApproveWithReverting() (gas: 5508) SafeTransferLibTest:testFailApproveWithReverting(address,uint256,bytes) (runs: 256, μ: 6409, ~: 6404) SafeTransferLibTest:testFailTransferETHToContractWithoutFallback() (gas: 7244) SafeTransferLibTest:testFailTransferETHToContractWithoutFallback(uint256,bytes) (runs: 256, μ: 7758, ~: 8055) -SafeTransferLibTest:testFailTransferFromWithGarbage(address,address,uint256,bytes,bytes) (runs: 256, μ: 123254, ~: 117413) +SafeTransferLibTest:testFailTransferFromWithGarbage(address,address,uint256,bytes,bytes) (runs: 256, μ: 122802, ~: 117413) SafeTransferLibTest:testFailTransferFromWithReturnsFalse() (gas: 13675) SafeTransferLibTest:testFailTransferFromWithReturnsFalse(address,address,uint256,bytes) (runs: 256, μ: 14605, ~: 14600) SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle() (gas: 13556) @@ -518,7 +519,7 @@ SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle(address,address,uin SafeTransferLibTest:testFailTransferFromWithReturnsTwo(address,address,uint256,bytes) (runs: 256, μ: 14571, ~: 14566) SafeTransferLibTest:testFailTransferFromWithReverting() (gas: 9757) SafeTransferLibTest:testFailTransferFromWithReverting(address,address,uint256,bytes) (runs: 256, μ: 10685, ~: 10680) -SafeTransferLibTest:testFailTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 90366, ~: 83995) +SafeTransferLibTest:testFailTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 89567, ~: 83995) SafeTransferLibTest:testFailTransferWithReturnsFalse() (gas: 8538) SafeTransferLibTest:testFailTransferWithReturnsFalse(address,uint256,bytes) (runs: 256, μ: 9457, ~: 9452) SafeTransferLibTest:testFailTransferWithReturnsTooLittle() (gas: 8544) @@ -527,37 +528,37 @@ SafeTransferLibTest:testFailTransferWithReturnsTwo(address,uint256,bytes) (runs: SafeTransferLibTest:testFailTransferWithReverting() (gas: 8500) SafeTransferLibTest:testFailTransferWithReverting(address,uint256,bytes) (runs: 256, μ: 9356, ~: 9351) SafeTransferLibTest:testTransferETH() (gas: 34592) -SafeTransferLibTest:testTransferETH(address,uint256,bytes) (runs: 256, μ: 35865, ~: 37975) -SafeTransferLibTest:testTransferFromWithGarbage(address,address,uint256,bytes,bytes) (runs: 256, μ: 2907, ~: 2247) +SafeTransferLibTest:testTransferETH(address,uint256,bytes) (runs: 256, μ: 35455, ~: 37975) +SafeTransferLibTest:testTransferFromWithGarbage(address,address,uint256,bytes,bytes) (runs: 256, μ: 2914, ~: 2247) SafeTransferLibTest:testTransferFromWithMissingReturn() (gas: 49196) -SafeTransferLibTest:testTransferFromWithMissingReturn(address,address,uint256,bytes) (runs: 256, μ: 48365, ~: 49607) +SafeTransferLibTest:testTransferFromWithMissingReturn(address,address,uint256,bytes) (runs: 256, μ: 48350, ~: 49602) SafeTransferLibTest:testTransferFromWithNonContract() (gas: 3047) -SafeTransferLibTest:testTransferFromWithNonContract(address,address,address,uint256,bytes) (runs: 256, μ: 4233, ~: 4240) +SafeTransferLibTest:testTransferFromWithNonContract(address,address,address,uint256,bytes) (runs: 256, μ: 4245, ~: 4240) SafeTransferLibTest:testTransferFromWithReturnsTooMuch() (gas: 49820) -SafeTransferLibTest:testTransferFromWithReturnsTooMuch(address,address,uint256,bytes) (runs: 256, μ: 49012, ~: 50246) +SafeTransferLibTest:testTransferFromWithReturnsTooMuch(address,address,uint256,bytes) (runs: 256, μ: 48997, ~: 50242) SafeTransferLibTest:testTransferFromWithStandardERC20() (gas: 47612) -SafeTransferLibTest:testTransferFromWithStandardERC20(address,address,uint256,bytes) (runs: 256, μ: 46796, ~: 48058) -SafeTransferLibTest:testTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 2620, ~: 2187) +SafeTransferLibTest:testTransferFromWithStandardERC20(address,address,uint256,bytes) (runs: 256, μ: 46782, ~: 48048) +SafeTransferLibTest:testTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 2640, ~: 2187) SafeTransferLibTest:testTransferWithMissingReturn() (gas: 36672) SafeTransferLibTest:testTransferWithMissingReturn(address,uint256,bytes) (runs: 256, μ: 36007, ~: 37552) SafeTransferLibTest:testTransferWithNonContract() (gas: 3018) -SafeTransferLibTest:testTransferWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4191, ~: 4187) +SafeTransferLibTest:testTransferWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4192, ~: 4187) SafeTransferLibTest:testTransferWithReturnsTooMuch() (gas: 37118) SafeTransferLibTest:testTransferWithReturnsTooMuch(address,uint256,bytes) (runs: 256, μ: 36410, ~: 37955) SafeTransferLibTest:testTransferWithStandardERC20() (gas: 36702) SafeTransferLibTest:testTransferWithStandardERC20(address,uint256,bytes) (runs: 256, μ: 36060, ~: 37605) -SignedWadMathTest:testFailWadDivOverflow(int256,int256) (runs: 256, μ: 348, ~: 329) +SignedWadMathTest:testFailWadDivOverflow(int256,int256) (runs: 256, μ: 347, ~: 329) SignedWadMathTest:testFailWadDivZeroDenominator(int256) (runs: 256, μ: 296, ~: 296) SignedWadMathTest:testFailWadMulEdgeCase() (gas: 286) SignedWadMathTest:testFailWadMulEdgeCase2() (gas: 309) SignedWadMathTest:testFailWadMulOverflow(int256,int256) (runs: 256, μ: 354, ~: 319) -SignedWadMathTest:testWadDiv(uint256,uint256,bool,bool) (runs: 256, μ: 5696, ~: 5664) -SignedWadMathTest:testWadMul(uint256,uint256,bool,bool) (runs: 256, μ: 5744, ~: 5712) -WETHInvariants:invariantTotalSupplyEqualsBalance() (runs: 256, calls: 3840, reverts: 1929) +SignedWadMathTest:testWadDiv(uint256,uint256,bool,bool) (runs: 256, μ: 5697, ~: 5714) +SignedWadMathTest:testWadMul(uint256,uint256,bool,bool) (runs: 256, μ: 5745, ~: 5712) +WETHInvariants:invariantTotalSupplyEqualsBalance() (runs: 256, calls: 3840, reverts: 1839) WETHTest:testDeposit() (gas: 63535) -WETHTest:testDeposit(uint256) (runs: 256, μ: 62792, ~: 65880) +WETHTest:testDeposit(uint256) (runs: 256, μ: 63337, ~: 65880) WETHTest:testFallbackDeposit() (gas: 63249) -WETHTest:testFallbackDeposit(uint256) (runs: 256, μ: 62516, ~: 65604) +WETHTest:testFallbackDeposit(uint256) (runs: 256, μ: 63061, ~: 65604) WETHTest:testPartialWithdraw() (gas: 73281) WETHTest:testWithdraw() (gas: 54360) -WETHTest:testWithdraw(uint256,uint256) (runs: 256, μ: 75443, ~: 78076) \ No newline at end of file +WETHTest:testWithdraw(uint256,uint256) (runs: 256, μ: 75391, ~: 78076) \ No newline at end of file diff --git a/src/test/CREATE3.t.sol b/src/test/CREATE3.t.sol index b279eeb2..7ee8fc0d 100644 --- a/src/test/CREATE3.t.sol +++ b/src/test/CREATE3.t.sol @@ -8,10 +8,19 @@ import {MockAuthChild} from "./utils/mocks/MockAuthChild.sol"; import {CREATE3} from "../utils/CREATE3.sol"; +contract Factory { + function deploy(bytes32 salt) public returns (address deployed) { + deployed = CREATE3.deploy( + salt, + abi.encodePacked(type(MockERC20).creationCode, abi.encode("Mock Token", "MOCK", 18)), + 0 + ); + } +} + contract CREATE3Test is DSTestPlus { function testDeployERC20() public { bytes32 salt = keccak256(bytes("A salt!")); - MockERC20 deployed = MockERC20( CREATE3.deploy( salt, @@ -27,6 +36,22 @@ contract CREATE3Test is DSTestPlus { assertEq(deployed.decimals(), 18); } + function testPredictDeployERC20() public { + bytes32 salt = keccak256(bytes("A salt!")); + Factory factory = new Factory(); + + MockERC20 deployed = MockERC20( + factory.deploy(salt) + ); + + assertEq(address(deployed), CREATE3.getDeployed(salt, address(factory))); + assertTrue(address(deployed) != CREATE3.getDeployed(salt)); + + assertEq(deployed.name(), "Mock Token"); + assertEq(deployed.symbol(), "MOCK"); + assertEq(deployed.decimals(), 18); + } + function testFailDoubleDeploySameBytecode() public { bytes32 salt = keccak256(bytes("Salty...")); diff --git a/src/utils/CREATE3.sol b/src/utils/CREATE3.sol index 0d5b341e..8fe0511a 100644 --- a/src/utils/CREATE3.sol +++ b/src/utils/CREATE3.sol @@ -56,12 +56,16 @@ library CREATE3 { } function getDeployed(bytes32 salt) internal view returns (address) { + return getDeployed(salt, address(this)); + } + + function getDeployed(bytes32 salt, address creator) internal pure returns (address) { address proxy = keccak256( abi.encodePacked( // Prefix: bytes1(0xFF), // Creator: - address(this), + creator, // Salt: salt, // Bytecode hash: