From 587f7e723bf2970191542dc238f6aa0cf4e84ee8 Mon Sep 17 00:00:00 2001 From: Joshua Trujillo Date: Thu, 23 Nov 2023 04:29:28 -0800 Subject: [PATCH 1/4] rm totalSupply, add checked balances --- src/test/ERC6909.t.sol | 86 +++++++++++++++++++++++++++++++++++++----- src/tokens/ERC6909.sol | 28 ++------------ 2 files changed, 79 insertions(+), 35 deletions(-) diff --git a/src/test/ERC6909.t.sol b/src/test/ERC6909.t.sol index 309d1646..57cdb738 100644 --- a/src/test/ERC6909.t.sol +++ b/src/test/ERC6909.t.sol @@ -20,7 +20,6 @@ contract ERC6909Test is DSTestPlus { token.mint(address(0xBEEF), 1337, 100); assertEq(token.balanceOf(address(0xBEEF), 1337), 100); - assertEq(token.totalSupply(1337), 100); } function testBurn() public { @@ -28,7 +27,6 @@ contract ERC6909Test is DSTestPlus { token.burn(address(0xBEEF), 1337, 70); assertEq(token.balanceOf(address(0xBEEF), 1337), 30); - assertEq(token.totalSupply(1337), 30); } function testSetOperator() public { @@ -102,12 +100,12 @@ contract ERC6909Test is DSTestPlus { assertEq(token.balanceOf(receiver, 1337), 70); } - function testFailMint() public { + function testFailMintBalanceOverflow() public { token.mint(address(0xDEAD), 1337, type(uint256).max); - token.mint(address(0xBEEF), 1337, 1); + token.mint(address(0xDEAD), 1337, 1); } - function testFailTransfer() public { + function testFailTransferBalanceUnderflow() public { address sender = address(0xABCD); address receiver = address(0xBEEF); @@ -115,7 +113,22 @@ contract ERC6909Test is DSTestPlus { token.transferFrom(sender, receiver, 1337, 1); } - function testFailTransferFrom() public { + function testFailTransferBalanceOverflow() public { + address sender = address(0xABCD); + address receiver = address(0xBEEF); + + token.mint(sender, 1337, type(uint256).max); + + hevm.prank(sender); + token.transferFrom(sender, receiver, 1337, type(uint256).max); + + token.mint(sender, 1337, 1); + + hevm.prank(sender); + token.transferFrom(sender, receiver, 1337, 1); + } + + function testFailTransferFromBalanceUnderflow() public { address sender = address(0xABCD); address receiver = address(0xBEEF); @@ -123,6 +136,21 @@ contract ERC6909Test is DSTestPlus { token.transferFrom(sender, receiver, 1337, 1); } + function testFailTransferFromBalanceOverflow() public { + address sender = address(0xABCD); + address receiver = address(0xBEEF); + + token.mint(sender, 1337, type(uint256).max); + + hevm.prank(sender); + token.transferFrom(sender, receiver, 1337, type(uint256).max); + + token.mint(sender, 1337, 1); + + hevm.prank(sender); + token.transferFrom(sender, receiver, 1337, 1); + } + function testFailTransferFromNotAuthorized() public { address sender = address(0xABCD); address receiver = address(0xBEEF); @@ -140,7 +168,6 @@ contract ERC6909Test is DSTestPlus { token.mint(receiver, id, amount); assertEq(token.balanceOf(receiver, id), amount); - assertEq(token.totalSupply(id), amount); } function testBurn( @@ -152,7 +179,6 @@ contract ERC6909Test is DSTestPlus { token.burn(sender, id, amount); assertEq(token.balanceOf(sender, id), 0); - assertEq(token.totalSupply(id), 0); } function testSetOperator(address operator, bool approved) public { @@ -273,19 +299,39 @@ contract ERC6909Test is DSTestPlus { } } - function testFailTransfer( + function testFailTransferBalanceUnderflow( + address sender, + address receiver, + uint256 id, + uint256 amount + ) public { + amount = bound(amount, 1, type(uint256).max); + + hevm.prank(sender); + token.transfer(receiver, id, amount); + } + + function testFailTransferBalanceOverflow( address sender, address receiver, uint256 id, uint256 amount ) public { amount = bound(amount, 1, type(uint256).max); + uint256 overflowAmount = type(uint256).max - amount + 1; + + token.mint(sender, id, amount); hevm.prank(sender); token.transfer(receiver, id, amount); + + token.mint(sender, id, overflowAmount); + + hevm.prank(sender); + token.transfer(receiver, id, overflowAmount); } - function testFailTransferFrom( + function testFailTransferFromBalanceUnderflow( address sender, address receiver, uint256 id, @@ -297,6 +343,26 @@ contract ERC6909Test is DSTestPlus { token.transferFrom(sender, receiver, id, amount); } + function testFailTransferFromBalanceOverflow( + address sender, + address receiver, + uint256 id, + uint256 amount + ) public { + amount = bound(amount, 1, type(uint256).max); + uint256 overflowAmount = type(uint256).max - amount + 1; + + token.mint(sender, id, amount); + + hevm.prank(sender); + token.transferFrom(sender, receiver, id, amount); + + token.mint(sender, id, overflowAmount); + + hevm.prank(sender); + token.transferFrom(sender, receiver, id, overflowAmount); + } + function testFailTransferFromNotAuthorized( address sender, address receiver, diff --git a/src/tokens/ERC6909.sol b/src/tokens/ERC6909.sol index e9631698..13c778f5 100644 --- a/src/tokens/ERC6909.sol +++ b/src/tokens/ERC6909.sol @@ -18,8 +18,6 @@ abstract contract ERC6909 { ERC6909 STORAGE //////////////////////////////////////////////////////////////*/ - mapping(uint256 => uint256) public totalSupply; - mapping(address => mapping(address => bool)) public isOperator; mapping(address => mapping(uint256 => uint256)) public balanceOf; @@ -37,11 +35,7 @@ abstract contract ERC6909 { ) public virtual returns (bool) { balanceOf[msg.sender][id] -= amount; - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[receiver][id] += amount; - } + balanceOf[receiver][id] += amount; emit Transfer(msg.sender, msg.sender, receiver, id, amount); @@ -61,11 +55,7 @@ abstract contract ERC6909 { balanceOf[sender][id] -= amount; - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[receiver][id] += amount; - } + balanceOf[receiver][id] += amount; emit Transfer(msg.sender, sender, receiver, id, amount); @@ -111,13 +101,7 @@ abstract contract ERC6909 { uint256 id, uint256 amount ) internal virtual { - totalSupply[id] += amount; - - // Cannot overflow because the sum of all user - // balances can't exceed the max uint256 value. - unchecked { - balanceOf[receiver][id] += amount; - } + balanceOf[receiver][id] += amount; emit Transfer(msg.sender, address(0), receiver, id, amount); } @@ -129,12 +113,6 @@ abstract contract ERC6909 { ) internal virtual { balanceOf[sender][id] -= amount; - // Cannot underflow because a user's balance - // will never be larger than the total supply. - unchecked { - totalSupply[id] -= amount; - } - emit Transfer(msg.sender, sender, address(0), id, amount); } } From 7c541b21efb666881acea76dae6159f73c2a5b1a Mon Sep 17 00:00:00 2001 From: Joshua Trujillo Date: Thu, 23 Nov 2023 04:29:36 -0800 Subject: [PATCH 2/4] snap --- .gas-snapshot | 266 +++++++++++++++++++++++++------------------------- 1 file changed, 135 insertions(+), 131 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index f4fa5fc6..fb227d5f 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,6 +1,6 @@ AuthTest:testCallFunctionAsOwner() (gas: 29784) AuthTest:testCallFunctionWithPermissiveAuthority() (gas: 124292) -AuthTest:testCallFunctionWithPermissiveAuthority(address) (runs: 256, μ: 129235, ~: 129235) +AuthTest:testCallFunctionWithPermissiveAuthority(address) (runs: 256, μ: 129197, ~: 129235) AuthTest:testFailCallFunctionAsNonOwner() (gas: 15523) AuthTest:testFailCallFunctionAsNonOwner(address) (runs: 256, μ: 15685, ~: 15685) AuthTest:testFailCallFunctionAsOwnerWithOutOfOrderAuthority() (gas: 136021) @@ -17,18 +17,18 @@ 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, μ: 32306, ~: 32384) +AuthTest:testSetAuthorityAsOwner(address) (runs: 256, μ: 32384, ~: 32384) AuthTest:testSetAuthorityAsOwnerWithOutOfOrderAuthority() (gas: 226419) AuthTest:testSetAuthorityWithPermissiveAuthority() (gas: 125962) -AuthTest:testSetAuthorityWithPermissiveAuthority(address,address) (runs: 256, μ: 130899, ~: 131055) +AuthTest:testSetAuthorityWithPermissiveAuthority(address,address) (runs: 256, μ: 130862, ~: 131055) AuthTest:testTransferOwnershipAsOwner() (gas: 15298) -AuthTest:testTransferOwnershipAsOwner(address) (runs: 256, μ: 15450, ~: 15469) +AuthTest:testTransferOwnershipAsOwner(address) (runs: 256, μ: 15469, ~: 15469) AuthTest:testTransferOwnershipWithPermissiveAuthority() (gas: 127926) -AuthTest:testTransferOwnershipWithPermissiveAuthority(address,address) (runs: 256, μ: 130962, ~: 131000) +AuthTest:testTransferOwnershipWithPermissiveAuthority(address,address) (runs: 256, μ: 131000, ~: 131000) Bytes32AddressLibTest:testFillLast12Bytes() (gas: 223) Bytes32AddressLibTest:testFromLast20Bytes() (gas: 191) CREATE3Test:testDeployERC20() (gas: 853207) -CREATE3Test:testDeployERC20(bytes32,string,string,uint8) (runs: 256, μ: 938370, ~: 944970) +CREATE3Test:testDeployERC20(bytes32,string,string,uint8) (runs: 256, μ: 899408, ~: 899427) CREATE3Test:testFailDoubleDeployDifferentBytecode() (gas: 9079256848778914176) CREATE3Test:testFailDoubleDeployDifferentBytecode(bytes32,bytes,bytes) (runs: 256, μ: 5830806919119382084, ~: 8937393460516727580) CREATE3Test:testFailDoubleDeploySameBytecode() (gas: 9079256848778906219) @@ -41,23 +41,23 @@ DSTestPlusTest:testFailBoundMinBiggerThanMax() (gas: 309) 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:testApproveAll(address,bool) (runs: 256, μ: 22771, ~: 31309) ERC1155Test:testBatchBalanceOf() (gas: 157631) -ERC1155Test:testBatchBalanceOf(address[],uint256[],uint256[],bytes) (runs: 256, μ: 3309878, ~: 2596398) +ERC1155Test:testBatchBalanceOf(address[],uint256[],uint256[],bytes) (runs: 256, μ: 3564574, ~: 2943600) ERC1155Test:testBatchBurn() (gas: 151074) -ERC1155Test:testBatchBurn(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 3490436, ~: 3058687) +ERC1155Test:testBatchBurn(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 3627558, ~: 3049938) ERC1155Test:testBatchMintToEOA() (gas: 137337) -ERC1155Test:testBatchMintToEOA(address,uint256[],uint256[],bytes) (runs: 256, μ: 3293138, ~: 2941772) +ERC1155Test:testBatchMintToEOA(address,uint256[],uint256[],bytes) (runs: 256, μ: 3072824, ~: 2525648) ERC1155Test:testBatchMintToERC1155Recipient() (gas: 995703) ERC1155Test:testBatchMintToERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 7395823, ~: 6396323) ERC1155Test:testBurn() (gas: 38598) -ERC1155Test:testBurn(address,uint256,uint256,bytes,uint256) (runs: 256, μ: 40061, ~: 42098) +ERC1155Test:testBurn(address,uint256,uint256,bytes,uint256) (runs: 256, μ: 39631, ~: 42098) ERC1155Test:testFailBalanceOfBatchWithArrayMismatch() (gas: 7933) -ERC1155Test:testFailBalanceOfBatchWithArrayMismatch(address[],uint256[]) (runs: 256, μ: 53386, ~: 54066) +ERC1155Test:testFailBalanceOfBatchWithArrayMismatch(address[],uint256[]) (runs: 256, μ: 58022, ~: 58788) ERC1155Test:testFailBatchBurnInsufficientBalance() (gas: 136156) -ERC1155Test:testFailBatchBurnInsufficientBalance(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 1301377, ~: 440335) +ERC1155Test:testFailBatchBurnInsufficientBalance(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 1401354, ~: 590599) ERC1155Test:testFailBatchBurnWithArrayLengthMismatch() (gas: 135542) -ERC1155Test:testFailBatchBurnWithArrayLengthMismatch(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 77137, ~: 78751) +ERC1155Test:testFailBatchBurnWithArrayLengthMismatch(address,uint256[],uint256[],uint256[],bytes) (runs: 256, μ: 86139, ~: 76411) ERC1155Test:testFailBatchMintToNonERC1155Recipient() (gas: 167292) ERC1155Test:testFailBatchMintToNonERC1155Recipient(uint256[],uint256[],bytes) (runs: 256, μ: 3190100, ~: 2673077) ERC1155Test:testFailBatchMintToRevertingERC1155Recipient() (gas: 358811) @@ -67,9 +67,9 @@ ERC1155Test:testFailBatchMintToWrongReturnDataERC1155Recipient(uint256[],uint256 ERC1155Test:testFailBatchMintToZero() (gas: 131737) ERC1155Test:testFailBatchMintToZero(uint256[],uint256[],bytes) (runs: 256, μ: 3130600, ~: 2612336) ERC1155Test:testFailBatchMintWithArrayMismatch() (gas: 9600) -ERC1155Test:testFailBatchMintWithArrayMismatch(address,uint256[],uint256[],bytes) (runs: 256, μ: 69252, ~: 68809) +ERC1155Test:testFailBatchMintWithArrayMismatch(address,uint256[],uint256[],bytes) (runs: 256, μ: 66450, ~: 66511) ERC1155Test:testFailBurnInsufficientBalance() (gas: 34852) -ERC1155Test:testFailBurnInsufficientBalance(address,uint256,uint256,uint256,bytes) (runs: 256, μ: 35951, ~: 38209) +ERC1155Test:testFailBurnInsufficientBalance(address,uint256,uint256,uint256,bytes) (runs: 256, μ: 35106, ~: 38209) ERC1155Test:testFailMintToNonERC155Recipient() (gas: 68191) ERC1155Test:testFailMintToNonERC155Recipient(uint256,uint256,bytes) (runs: 256, μ: 68507, ~: 69197) ERC1155Test:testFailMintToRevertingERC155Recipient() (gas: 259435) @@ -79,21 +79,21 @@ 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, μ: 3541296, ~: 2963551) +ERC1155Test:testFailSafeBatchTransferFromToNonERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3541141, ~: 2963551) ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient() (gas: 512956) -ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3732833, ~: 3155082) +ERC1155Test:testFailSafeBatchTransferFromToRevertingERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3732678, ~: 3155082) ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient() (gas: 464847) -ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3684751, ~: 3107003) +ERC1155Test:testFailSafeBatchTransferFromToWrongReturnDataERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3684595, ~: 3107003) ERC1155Test:testFailSafeBatchTransferFromToZero() (gas: 286556) -ERC1155Test:testFailSafeBatchTransferFromToZero(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3505805, ~: 2928396) +ERC1155Test:testFailSafeBatchTransferFromToZero(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 3505960, ~: 2928396) ERC1155Test:testFailSafeBatchTransferFromWithArrayLengthMismatch() (gas: 162674) -ERC1155Test:testFailSafeBatchTransferFromWithArrayLengthMismatch(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 81184, ~: 82042) +ERC1155Test:testFailSafeBatchTransferFromWithArrayLengthMismatch(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 79144, ~: 76711) ERC1155Test:testFailSafeBatchTransferInsufficientBalance() (gas: 163555) -ERC1155Test:testFailSafeBatchTransferInsufficientBalance(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 1528922, ~: 499517) +ERC1155Test:testFailSafeBatchTransferInsufficientBalance(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 1808833, ~: 648144) ERC1155Test:testFailSafeTransferFromInsufficientBalance() (gas: 63245) -ERC1155Test:testFailSafeTransferFromInsufficientBalance(address,uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 63986, ~: 67405) +ERC1155Test:testFailSafeTransferFromInsufficientBalance(address,uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 62944, ~: 67391) ERC1155Test:testFailSafeTransferFromSelfInsufficientBalance() (gas: 34297) -ERC1155Test:testFailSafeTransferFromSelfInsufficientBalance(address,uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 36266, ~: 38512) +ERC1155Test:testFailSafeTransferFromSelfInsufficientBalance(address,uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 35671, ~: 38477) ERC1155Test:testFailSafeTransferFromToNonERC155Recipient() (gas: 96510) ERC1155Test:testFailSafeTransferFromToNonERC155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 96657, ~: 100546) ERC1155Test:testFailSafeTransferFromToRevertingERC1155Recipient() (gas: 287731) @@ -101,53 +101,53 @@ ERC1155Test:testFailSafeTransferFromToRevertingERC1155Recipient(uint256,uint256, ERC1155Test:testFailSafeTransferFromToWrongReturnDataERC1155Recipient() (gas: 239587) ERC1155Test:testFailSafeTransferFromToWrongReturnDataERC1155Recipient(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 239707, ~: 243598) ERC1155Test:testFailSafeTransferFromToZero() (gas: 62014) -ERC1155Test:testFailSafeTransferFromToZero(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 62146, ~: 66037) +ERC1155Test:testFailSafeTransferFromToZero(uint256,uint256,uint256,bytes,bytes) (runs: 256, μ: 62068, ~: 66037) ERC1155Test:testMintToEOA() (gas: 34765) -ERC1155Test:testMintToEOA(address,uint256,uint256,bytes) (runs: 256, μ: 35562, ~: 35907) +ERC1155Test:testMintToEOA(address,uint256,uint256,bytes) (runs: 256, μ: 35273, ~: 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, μ: 4801633, ~: 3787204) +ERC1155Test:testSafeBatchTransferFromToEOA(address,uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 5017684, ~: 4010502) ERC1155Test:testSafeBatchTransferFromToERC1155Recipient() (gas: 1175327) -ERC1155Test:testSafeBatchTransferFromToERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 7759541, ~: 6618414) +ERC1155Test:testSafeBatchTransferFromToERC1155Recipient(uint256[],uint256[],uint256[],bytes,bytes) (runs: 256, μ: 7759463, ~: 6618414) ERC1155Test:testSafeTransferFromSelf() (gas: 64177) -ERC1155Test:testSafeTransferFromSelf(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 64552, ~: 68564) +ERC1155Test:testSafeTransferFromSelf(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 64681, ~: 68564) ERC1155Test:testSafeTransferFromToEOA() (gas: 93167) -ERC1155Test:testSafeTransferFromToEOA(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 92808, ~: 97450) +ERC1155Test:testSafeTransferFromToEOA(uint256,uint256,bytes,uint256,address,bytes) (runs: 256, μ: 93963, ~: 97450) ERC1155Test:testSafeTransferFromToERC1155Recipient() (gas: 739583) -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) +ERC1155Test:testSafeTransferFromToERC1155Recipient(uint256,uint256,bytes,uint256,bytes) (runs: 256, μ: 769591, ~: 765729) +ERC20Invariants:invariantBalanceSum() (runs: 256, calls: 3840, reverts: 2349) +ERC20Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2566) ERC20Test:testApprove() (gas: 31058) -ERC20Test:testApprove(address,uint256) (runs: 256, μ: 30424, ~: 31280) +ERC20Test:testApprove(address,uint256) (runs: 256, μ: 30036, ~: 31280) ERC20Test:testBurn() (gas: 56970) -ERC20Test:testBurn(address,uint256,uint256) (runs: 256, μ: 56678, ~: 59645) -ERC20Test:testFailBurnInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 51897, ~: 55492) +ERC20Test:testBurn(address,uint256,uint256) (runs: 256, μ: 57875, ~: 59645) +ERC20Test:testFailBurnInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 52089, ~: 55492) ERC20Test:testFailPermitBadDeadline() (gas: 36935) -ERC20Test:testFailPermitBadDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 32016, ~: 37218) +ERC20Test:testFailPermitBadDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 31831, ~: 37218) ERC20Test:testFailPermitBadNonce() (gas: 36874) -ERC20Test:testFailPermitBadNonce(uint256,address,uint256,uint256,uint256) (runs: 256, μ: 31497, ~: 37187) +ERC20Test:testFailPermitBadNonce(uint256,address,uint256,uint256,uint256) (runs: 256, μ: 32158, ~: 37187) ERC20Test:testFailPermitPastDeadline() (gas: 11191) -ERC20Test:testFailPermitPastDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 12007, ~: 13101) +ERC20Test:testFailPermitPastDeadline(uint256,address,uint256,uint256) (runs: 256, μ: 11916, ~: 13101) ERC20Test:testFailPermitReplay() (gas: 66274) -ERC20Test:testFailPermitReplay(uint256,address,uint256,uint256) (runs: 256, μ: 56825, ~: 66592) +ERC20Test:testFailPermitReplay(uint256,address,uint256,uint256) (runs: 256, μ: 56082, ~: 66592) ERC20Test:testFailTransferFromInsufficientAllowance() (gas: 80882) -ERC20Test:testFailTransferFromInsufficientAllowance(address,uint256,uint256) (runs: 256, μ: 79858, ~: 83393) +ERC20Test:testFailTransferFromInsufficientAllowance(address,uint256,uint256) (runs: 256, μ: 79521, ~: 83393) ERC20Test:testFailTransferFromInsufficientBalance() (gas: 81358) -ERC20Test:testFailTransferFromInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 79359, ~: 83870) +ERC20Test:testFailTransferFromInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 79323, ~: 83870) ERC20Test:testFailTransferInsufficientBalance() (gas: 52806) -ERC20Test:testFailTransferInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 51720, ~: 55310) +ERC20Test:testFailTransferInsufficientBalance(address,uint256,uint256) (runs: 256, μ: 51912, ~: 55310) ERC20Test:testInfiniteApproveTransferFrom() (gas: 89793) -ERC20Test:testMetadata(string,string,uint8) (runs: 256, μ: 870921, ~: 863565) +ERC20Test:testMetadata(string,string,uint8) (runs: 256, μ: 846655, ~: 840944) ERC20Test:testMint() (gas: 53746) -ERC20Test:testMint(address,uint256) (runs: 256, μ: 52214, ~: 53925) +ERC20Test:testMint(address,uint256) (runs: 256, μ: 51437, ~: 53925) ERC20Test:testPermit() (gas: 63193) -ERC20Test:testPermit(uint248,address,uint256,uint256) (runs: 256, μ: 62584, ~: 63517) +ERC20Test:testPermit(uint248,address,uint256,uint256) (runs: 256, μ: 62506, ~: 63517) ERC20Test:testTransfer() (gas: 60272) -ERC20Test:testTransfer(address,uint256) (runs: 256, μ: 58773, ~: 60484) +ERC20Test:testTransfer(address,uint256) (runs: 256, μ: 57996, ~: 60484) ERC20Test:testTransferFrom() (gas: 83777) -ERC20Test:testTransferFrom(address,uint256,uint256) (runs: 256, μ: 86464, ~: 92841) -ERC4626Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2951) +ERC20Test:testTransferFrom(address,uint256,uint256) (runs: 256, μ: 86993, ~: 92841) +ERC4626Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2883) ERC4626Test:testFailDepositWithNoApproval() (gas: 13369) ERC4626Test:testFailDepositWithNotEnoughApproval() (gas: 87005) ERC4626Test:testFailDepositZero() (gas: 7780) @@ -157,45 +157,49 @@ ERC4626Test:testFailRedeemWithNotEnoughShareAmount() (gas: 203643) ERC4626Test:testFailRedeemZero() (gas: 7967) ERC4626Test:testFailWithdrawWithNoUnderlyingAmount() (gas: 32289) ERC4626Test:testFailWithdrawWithNotEnoughUnderlyingAmount() (gas: 203607) -ERC4626Test:testMetadata(string,string) (runs: 256, μ: 1506515, ~: 1495306) +ERC4626Test:testMetadata(string,string) (runs: 256, μ: 1471865, ~: 1472396) ERC4626Test:testMintZero() (gas: 54607) ERC4626Test:testMultipleMintDepositRedeemWithdraw() (gas: 411804) 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, μ: 41740, ~: 42852) -ERC6909Test:testFailMint() (gas: 53818) -ERC6909Test:testFailTransfer() (gas: 10823) -ERC6909Test:testFailTransfer(address,address,uint256,uint256) (runs: 256, μ: 13203, ~: 13203) -ERC6909Test:testFailTransferFrom() (gas: 10846) -ERC6909Test:testFailTransferFrom(address,address,uint256,uint256) (runs: 256, μ: 13426, ~: 13426) -ERC6909Test:testFailTransferFromNotAuthorized() (gas: 58272) -ERC6909Test:testFailTransferFromNotAuthorized(address,address,uint256,uint256) (runs: 256, μ: 60827, ~: 60827) -ERC6909Test:testMint() (gas: 54775) -ERC6909Test:testMint(address,uint256,uint256) (runs: 256, μ: 53101, ~: 54967) -ERC6909Test:testSetOperator() (gas: 31115) -ERC6909Test:testSetOperator(address,bool) (runs: 256, μ: 17106, ~: 11596) -ERC6909Test:testTransfer() (gas: 83929) -ERC6909Test:testTransfer(address,address,uint256,uint256,uint256) (runs: 256, μ: 82241, ~: 86605) -ERC6909Test:testTransferFromAsOperator() (gas: 109473) -ERC6909Test:testTransferFromAsOperator(address,address,uint256,uint256,uint256) (runs: 256, μ: 107780, ~: 112144) -ERC6909Test:testTransferFromWithApproval() (gas: 114030) -ERC6909Test:testTransferFromWithApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 111484, ~: 116749) -ERC6909Test:testTransferFromWithInfiniteApproval() (gas: 113593) -ERC6909Test:testTransferFromWithInfiniteApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 111927, ~: 116291) -ERC721Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2156) +ERC6909Test:testApprove() (gas: 31572) +ERC6909Test:testApprove(address,uint256,uint256) (runs: 256, μ: 30860, ~: 31793) +ERC6909Test:testBurn() (gas: 35411) +ERC6909Test:testBurn(address,uint256,uint256) (runs: 256, μ: 23770, ~: 24148) +ERC6909Test:testFailMintBalanceOverflow() (gas: 31727) +ERC6909Test:testFailTransferBalanceOverflow() (gas: 85598) +ERC6909Test:testFailTransferBalanceOverflow(address,address,uint256,uint256) (runs: 256, μ: 87909, ~: 87909) +ERC6909Test:testFailTransferBalanceUnderflow() (gas: 10847) +ERC6909Test:testFailTransferBalanceUnderflow(address,address,uint256,uint256) (runs: 256, μ: 13194, ~: 13194) +ERC6909Test:testFailTransferFromBalanceOverflow() (gas: 85554) +ERC6909Test:testFailTransferFromBalanceOverflow(address,address,uint256,uint256) (runs: 256, μ: 88327, ~: 88327) +ERC6909Test:testFailTransferFromBalanceUnderflow() (gas: 10868) +ERC6909Test:testFailTransferFromBalanceUnderflow(address,address,uint256,uint256) (runs: 256, μ: 13424, ~: 13424) +ERC6909Test:testFailTransferFromNotAuthorized() (gas: 36078) +ERC6909Test:testFailTransferFromNotAuthorized(address,address,uint256,uint256) (runs: 256, μ: 38677, ~: 38677) +ERC6909Test:testMint() (gas: 31579) +ERC6909Test:testMint(address,uint256,uint256) (runs: 256, μ: 30878, ~: 31811) +ERC6909Test:testSetOperator() (gas: 31083) +ERC6909Test:testSetOperator(address,bool) (runs: 256, μ: 22873, ~: 31411) +ERC6909Test:testTransfer() (gas: 61874) +ERC6909Test:testTransfer(address,address,uint256,uint256,uint256) (runs: 256, μ: 59908, ~: 64506) +ERC6909Test:testTransferFromAsOperator() (gas: 87418) +ERC6909Test:testTransferFromAsOperator(address,address,uint256,uint256,uint256) (runs: 256, μ: 85273, ~: 90112) +ERC6909Test:testTransferFromWithApproval() (gas: 91890) +ERC6909Test:testTransferFromWithApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 88775, ~: 94697) +ERC6909Test:testTransferFromWithInfiniteApproval() (gas: 91541) +ERC6909Test:testTransferFromWithInfiniteApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 89501, ~: 94262) +ERC721Test:invariantMetadata() (runs: 256, calls: 3840, reverts: 2192) ERC721Test:testApprove() (gas: 78427) ERC721Test:testApprove(address,uint256) (runs: 256, μ: 78637, ~: 78637) ERC721Test:testApproveAll() (gas: 31063) -ERC721Test:testApproveAll(address,bool) (runs: 256, μ: 17048, ~: 11538) +ERC721Test:testApproveAll(address,bool) (runs: 256, μ: 22869, ~: 31407) ERC721Test:testApproveBurn() (gas: 65550) -ERC721Test:testApproveBurn(address,uint256) (runs: 256, μ: 65422, ~: 65619) +ERC721Test:testApproveBurn(address,uint256) (runs: 256, μ: 65609, ~: 65621) ERC721Test:testBurn() (gas: 46107) -ERC721Test:testBurn(address,uint256) (runs: 256, μ: 46147, ~: 46157) +ERC721Test:testBurn(address,uint256) (runs: 256, μ: 46148, ~: 46160) ERC721Test:testFailApproveUnAuthorized() (gas: 55598) ERC721Test:testFailApproveUnAuthorized(address,uint256,address) (runs: 256, μ: 55872, ~: 55873) ERC721Test:testFailApproveUnMinted() (gas: 10236) @@ -236,35 +240,35 @@ 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, μ: 57905, ~: 58162) +ERC721Test:testFailTransferFromNotOwner(address,address,uint256) (runs: 256, μ: 58144, ~: 58162) ERC721Test:testFailTransferFromToZero() (gas: 53381) ERC721Test:testFailTransferFromToZero(uint256) (runs: 256, μ: 53463, ~: 53463) ERC721Test:testFailTransferFromUnOwned() (gas: 8000) -ERC721Test:testFailTransferFromUnOwned(address,address,uint256) (runs: 256, μ: 8294, ~: 8241) +ERC721Test:testFailTransferFromUnOwned(address,address,uint256) (runs: 256, μ: 8276, ~: 8241) ERC721Test:testFailTransferFromWrongFrom() (gas: 53361) -ERC721Test:testFailTransferFromWrongFrom(address,address,address,uint256) (runs: 256, μ: 53566, ~: 53752) -ERC721Test:testMetadata(string,string) (runs: 256, μ: 1344402, ~: 1332786) +ERC721Test:testFailTransferFromWrongFrom(address,address,address,uint256) (runs: 256, μ: 53194, ~: 53752) +ERC721Test:testMetadata(string,string) (runs: 256, μ: 1309634, ~: 1309984) ERC721Test:testMint() (gas: 54336) ERC721Test:testMint(address,uint256) (runs: 256, μ: 54521, ~: 54521) ERC721Test:testSafeMintToEOA() (gas: 56993) -ERC721Test:testSafeMintToEOA(uint256,address) (runs: 256, μ: 56764, ~: 57421) +ERC721Test:testSafeMintToEOA(uint256,address) (runs: 256, μ: 56754, ~: 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, μ: 95735, ~: 96099) +ERC721Test:testSafeTransferFromToEOA(uint256,address) (runs: 256, μ: 94979, ~: 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, μ: 86459, ~: 86468) +ERC721Test:testTransferFrom(uint256,address) (runs: 256, μ: 86467, ~: 86475) ERC721Test:testTransferFromApproveAll() (gas: 92898) ERC721Test:testTransferFromApproveAll(uint256,address) (runs: 256, μ: 93181, ~: 93182) ERC721Test:testTransferFromSelf() (gas: 64776) ERC721Test:testTransferFromSelf(uint256,address) (runs: 256, μ: 65060, ~: 65061) -FixedPointMathLibTest:testDifferentiallyFuzzSqrt(uint256) (runs: 256, μ: 13872, ~: 6222) +FixedPointMathLibTest:testDifferentiallyFuzzSqrt(uint256) (runs: 256, μ: 13868, ~: 6222) FixedPointMathLibTest:testDivWadDown() (gas: 820) FixedPointMathLibTest:testDivWadDown(uint256,uint256) (runs: 256, μ: 716, ~: 813) FixedPointMathLibTest:testDivWadDownEdgeCases() (gas: 439) @@ -315,9 +319,9 @@ MerkleProofLibTest:testVerifyEmptyMerkleProofSuppliedLeafAndRootDifferent() (gas MerkleProofLibTest:testVerifyEmptyMerkleProofSuppliedLeafAndRootSame() (gas: 1452) MerkleProofLibTest:testVerifyInvalidProofSupplied() (gas: 2172) MultiRolesAuthorityTest:testCanCallPublicCapability() (gas: 34204) -MultiRolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 34387, ~: 34364) +MultiRolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 34392, ~: 34361) MultiRolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 80416) -MultiRolesAuthorityTest:testCanCallWithAuthorizedRole(address,uint8,address,bytes4) (runs: 256, μ: 80702, ~: 80671) +MultiRolesAuthorityTest:testCanCallWithAuthorizedRole(address,uint8,address,bytes4) (runs: 256, μ: 80700, ~: 80671) MultiRolesAuthorityTest:testCanCallWithCustomAuthority() (gas: 422439) MultiRolesAuthorityTest:testCanCallWithCustomAuthority(address,address,bytes4) (runs: 256, μ: 422858, ~: 422858) MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesPublicCapability() (gas: 247388) @@ -325,38 +329,38 @@ MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesPublicCapability( MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesUserWithRole() (gas: 256546) MultiRolesAuthorityTest:testCanCallWithCustomAuthorityOverridesUserWithRole(address,uint8,address,bytes4) (runs: 256, μ: 256878, ~: 256852) MultiRolesAuthorityTest:testSetPublicCapabilities() (gas: 27727) -MultiRolesAuthorityTest:testSetPublicCapabilities(bytes4) (runs: 256, μ: 27836, ~: 27835) +MultiRolesAuthorityTest:testSetPublicCapabilities(bytes4) (runs: 256, μ: 27837, ~: 27835) MultiRolesAuthorityTest:testSetRoleCapabilities() (gas: 28932) -MultiRolesAuthorityTest:testSetRoleCapabilities(uint8,bytes4) (runs: 256, μ: 29073, ~: 29072) +MultiRolesAuthorityTest:testSetRoleCapabilities(uint8,bytes4) (runs: 256, μ: 29075, ~: 29072) MultiRolesAuthorityTest:testSetRoles() (gas: 28918) -MultiRolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29026, ~: 29014) +MultiRolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29027, ~: 29014) MultiRolesAuthorityTest:testSetTargetCustomAuthority() (gas: 28102) -MultiRolesAuthorityTest:testSetTargetCustomAuthority(address,address) (runs: 256, μ: 28113, ~: 28146) +MultiRolesAuthorityTest:testSetTargetCustomAuthority(address,address) (runs: 256, μ: 28115, ~: 28144) OwnedTest:testCallFunctionAsNonOwner() (gas: 11344) -OwnedTest:testCallFunctionAsNonOwner(address) (runs: 256, μ: 16252, ~: 16290) +OwnedTest:testCallFunctionAsNonOwner(address) (runs: 256, μ: 16271, ~: 16290) OwnedTest:testCallFunctionAsOwner() (gas: 10435) OwnedTest:testTransferOwnership() (gas: 13123) -OwnedTest:testTransferOwnership(address) (runs: 256, μ: 13154, ~: 13192) -ReentrancyGuardTest:invariantReentrancyStatusAlways1() (runs: 256, calls: 3840, reverts: 282) +OwnedTest:testTransferOwnership(address) (runs: 256, μ: 13162, ~: 13192) +ReentrancyGuardTest:invariantReentrancyStatusAlways1() (runs: 256, calls: 3840, reverts: 254) ReentrancyGuardTest:testFailUnprotectedCall() (gas: 46147) ReentrancyGuardTest:testNoReentrancy() (gas: 7515) ReentrancyGuardTest:testProtectedCall() (gas: 33467) RolesAuthorityTest:testCanCallPublicCapability() (gas: 33409) -RolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 33558, ~: 33534) +RolesAuthorityTest:testCanCallPublicCapability(address,address,bytes4) (runs: 256, μ: 33559, ~: 33532) RolesAuthorityTest:testCanCallWithAuthorizedRole() (gas: 79995) RolesAuthorityTest:testCanCallWithAuthorizedRole(address,uint8,address,bytes4) (runs: 256, μ: 80265, ~: 80238) RolesAuthorityTest:testSetPublicCapabilities() (gas: 29095) -RolesAuthorityTest:testSetPublicCapabilities(address,bytes4) (runs: 256, μ: 29206, ~: 29192) +RolesAuthorityTest:testSetPublicCapabilities(address,bytes4) (runs: 256, μ: 29211, ~: 29192) RolesAuthorityTest:testSetRoleCapabilities() (gas: 30276) -RolesAuthorityTest:testSetRoleCapabilities(uint8,address,bytes4) (runs: 256, μ: 30503, ~: 30489) +RolesAuthorityTest:testSetRoleCapabilities(uint8,address,bytes4) (runs: 256, μ: 30507, ~: 30489) RolesAuthorityTest:testSetRoles() (gas: 29005) -RolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29119, ~: 29106) +RolesAuthorityTest:testSetRoles(address,uint8) (runs: 256, μ: 29118, ~: 29106) SSTORE2Test:testFailReadInvalidPointer() (gas: 2927) -SSTORE2Test:testFailReadInvalidPointer(address,bytes) (runs: 256, μ: 3889, ~: 3892) +SSTORE2Test:testFailReadInvalidPointer(address,bytes) (runs: 256, μ: 3858, ~: 3892) SSTORE2Test:testFailReadInvalidPointerCustomBounds() (gas: 3099) -SSTORE2Test:testFailReadInvalidPointerCustomBounds(address,uint256,uint256,bytes) (runs: 256, μ: 4111, ~: 4130) +SSTORE2Test:testFailReadInvalidPointerCustomBounds(address,uint256,uint256,bytes) (runs: 256, μ: 4072, ~: 4130) SSTORE2Test:testFailReadInvalidPointerCustomStartBound() (gas: 3004) -SSTORE2Test:testFailReadInvalidPointerCustomStartBound(address,uint256,bytes) (runs: 256, μ: 3950, ~: 3988) +SSTORE2Test:testFailReadInvalidPointerCustomStartBound(address,uint256,bytes) (runs: 256, μ: 3960, ~: 3988) SSTORE2Test:testFailWriteReadCustomBoundsOutOfRange(bytes,uint256,uint256,bytes) (runs: 256, μ: 46236, ~: 43603) SSTORE2Test:testFailWriteReadCustomStartBoundOutOfRange(bytes,uint256,bytes) (runs: 256, μ: 46017, ~: 43452) SSTORE2Test:testFailWriteReadEmptyOutOfBounds() (gas: 34470) @@ -365,7 +369,7 @@ 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, μ: 28690, ~: 42377) +SSTORE2Test:testWriteReadCustomBounds(bytes,uint256,uint256,bytes) (runs: 256, μ: 28531, ~: 41976) SSTORE2Test:testWriteReadCustomStartBound() (gas: 34740) SSTORE2Test:testWriteReadCustomStartBound(bytes,uint256,bytes) (runs: 256, μ: 46485, ~: 44053) SSTORE2Test:testWriteReadEmptyBound() (gas: 34677) @@ -492,16 +496,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, μ: 2684, ~: 2231) +SafeTransferLibTest:testApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 3016, ~: 2231) SafeTransferLibTest:testApproveWithMissingReturn() (gas: 30757) -SafeTransferLibTest:testApproveWithMissingReturn(address,uint256,bytes) (runs: 256, μ: 30334, ~: 31572) +SafeTransferLibTest:testApproveWithMissingReturn(address,uint256,bytes) (runs: 256, μ: 30800, ~: 31572) SafeTransferLibTest:testApproveWithNonContract() (gas: 3041) -SafeTransferLibTest:testApproveWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4128, ~: 4123) +SafeTransferLibTest:testApproveWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4095, ~: 4123) SafeTransferLibTest:testApproveWithReturnsTooMuch() (gas: 31140) -SafeTransferLibTest:testApproveWithReturnsTooMuch(address,uint256,bytes) (runs: 256, μ: 30802, ~: 32040) +SafeTransferLibTest:testApproveWithReturnsTooMuch(address,uint256,bytes) (runs: 256, μ: 31268, ~: 32040) SafeTransferLibTest:testApproveWithStandardERC20() (gas: 30888) -SafeTransferLibTest:testApproveWithStandardERC20(address,uint256,bytes) (runs: 256, μ: 30528, ~: 31766) -SafeTransferLibTest:testFailApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 83705, ~: 77915) +SafeTransferLibTest:testApproveWithStandardERC20(address,uint256,bytes) (runs: 256, μ: 30994, ~: 31766) +SafeTransferLibTest:testFailApproveWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 85288, ~: 77915) SafeTransferLibTest:testFailApproveWithReturnsFalse() (gas: 5633) SafeTransferLibTest:testFailApproveWithReturnsFalse(address,uint256,bytes) (runs: 256, μ: 6486, ~: 6481) SafeTransferLibTest:testFailApproveWithReturnsTooLittle() (gas: 5574) @@ -511,15 +515,15 @@ 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, μ: 122802, ~: 117413) +SafeTransferLibTest:testFailTransferFromWithGarbage(address,address,uint256,bytes,bytes) (runs: 256, μ: 120098, ~: 117413) SafeTransferLibTest:testFailTransferFromWithReturnsFalse() (gas: 13675) -SafeTransferLibTest:testFailTransferFromWithReturnsFalse(address,address,uint256,bytes) (runs: 256, μ: 14605, ~: 14600) +SafeTransferLibTest:testFailTransferFromWithReturnsFalse(address,address,uint256,bytes) (runs: 256, μ: 14606, ~: 14600) SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle() (gas: 13556) -SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle(address,address,uint256,bytes) (runs: 256, μ: 14464, ~: 14459) -SafeTransferLibTest:testFailTransferFromWithReturnsTwo(address,address,uint256,bytes) (runs: 256, μ: 14571, ~: 14566) +SafeTransferLibTest:testFailTransferFromWithReturnsTooLittle(address,address,uint256,bytes) (runs: 256, μ: 14465, ~: 14459) +SafeTransferLibTest:testFailTransferFromWithReturnsTwo(address,address,uint256,bytes) (runs: 256, μ: 14572, ~: 14566) SafeTransferLibTest:testFailTransferFromWithReverting() (gas: 9757) -SafeTransferLibTest:testFailTransferFromWithReverting(address,address,uint256,bytes) (runs: 256, μ: 10685, ~: 10680) -SafeTransferLibTest:testFailTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 89567, ~: 83995) +SafeTransferLibTest:testFailTransferFromWithReverting(address,address,uint256,bytes) (runs: 256, μ: 10686, ~: 10680) +SafeTransferLibTest:testFailTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 91079, ~: 83995) SafeTransferLibTest:testFailTransferWithReturnsFalse() (gas: 8538) SafeTransferLibTest:testFailTransferWithReturnsFalse(address,uint256,bytes) (runs: 256, μ: 9457, ~: 9452) SafeTransferLibTest:testFailTransferWithReturnsTooLittle() (gas: 8544) @@ -528,37 +532,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, μ: 35455, ~: 37975) -SafeTransferLibTest:testTransferFromWithGarbage(address,address,uint256,bytes,bytes) (runs: 256, μ: 2914, ~: 2247) +SafeTransferLibTest:testTransferETH(address,uint256,bytes) (runs: 256, μ: 35787, ~: 37975) +SafeTransferLibTest:testTransferFromWithGarbage(address,address,uint256,bytes,bytes) (runs: 256, μ: 3348, ~: 2253) SafeTransferLibTest:testTransferFromWithMissingReturn() (gas: 49196) -SafeTransferLibTest:testTransferFromWithMissingReturn(address,address,uint256,bytes) (runs: 256, μ: 48350, ~: 49602) +SafeTransferLibTest:testTransferFromWithMissingReturn(address,address,uint256,bytes) (runs: 256, μ: 48997, ~: 49580) SafeTransferLibTest:testTransferFromWithNonContract() (gas: 3047) -SafeTransferLibTest:testTransferFromWithNonContract(address,address,address,uint256,bytes) (runs: 256, μ: 4245, ~: 4240) +SafeTransferLibTest:testTransferFromWithNonContract(address,address,address,uint256,bytes) (runs: 256, μ: 4234, ~: 4240) SafeTransferLibTest:testTransferFromWithReturnsTooMuch() (gas: 49820) -SafeTransferLibTest:testTransferFromWithReturnsTooMuch(address,address,uint256,bytes) (runs: 256, μ: 48997, ~: 50242) +SafeTransferLibTest:testTransferFromWithReturnsTooMuch(address,address,uint256,bytes) (runs: 256, μ: 49640, ~: 50219) SafeTransferLibTest:testTransferFromWithStandardERC20() (gas: 47612) -SafeTransferLibTest:testTransferFromWithStandardERC20(address,address,uint256,bytes) (runs: 256, μ: 46782, ~: 48048) -SafeTransferLibTest:testTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 2640, ~: 2187) +SafeTransferLibTest:testTransferFromWithStandardERC20(address,address,uint256,bytes) (runs: 256, μ: 47345, ~: 48031) +SafeTransferLibTest:testTransferWithGarbage(address,uint256,bytes,bytes) (runs: 256, μ: 3006, ~: 2187) SafeTransferLibTest:testTransferWithMissingReturn() (gas: 36672) -SafeTransferLibTest:testTransferWithMissingReturn(address,uint256,bytes) (runs: 256, μ: 36007, ~: 37552) +SafeTransferLibTest:testTransferWithMissingReturn(address,uint256,bytes) (runs: 256, μ: 36539, ~: 37552) SafeTransferLibTest:testTransferWithNonContract() (gas: 3018) -SafeTransferLibTest:testTransferWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4192, ~: 4187) +SafeTransferLibTest:testTransferWithNonContract(address,address,uint256,bytes) (runs: 256, μ: 4159, ~: 4187) SafeTransferLibTest:testTransferWithReturnsTooMuch() (gas: 37118) -SafeTransferLibTest:testTransferWithReturnsTooMuch(address,uint256,bytes) (runs: 256, μ: 36410, ~: 37955) +SafeTransferLibTest:testTransferWithReturnsTooMuch(address,uint256,bytes) (runs: 256, μ: 36942, ~: 37955) SafeTransferLibTest:testTransferWithStandardERC20() (gas: 36702) -SafeTransferLibTest:testTransferWithStandardERC20(address,uint256,bytes) (runs: 256, μ: 36060, ~: 37605) +SafeTransferLibTest:testTransferWithStandardERC20(address,uint256,bytes) (runs: 256, μ: 36592, ~: 37605) 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, μ: 5697, ~: 5714) -SignedWadMathTest:testWadMul(uint256,uint256,bool,bool) (runs: 256, μ: 5745, ~: 5712) -WETHInvariants:invariantTotalSupplyEqualsBalance() (runs: 256, calls: 3840, reverts: 1839) +SignedWadMathTest:testWadDiv(uint256,uint256,bool,bool) (runs: 256, μ: 5712, ~: 5714) +SignedWadMathTest:testWadMul(uint256,uint256,bool,bool) (runs: 256, μ: 5760, ~: 5762) +WETHInvariants:invariantTotalSupplyEqualsBalance() (runs: 256, calls: 3840, reverts: 1776) WETHTest:testDeposit() (gas: 63535) -WETHTest:testDeposit(uint256) (runs: 256, μ: 63337, ~: 65880) +WETHTest:testDeposit(uint256) (runs: 256, μ: 63155, ~: 65880) WETHTest:testFallbackDeposit() (gas: 63249) -WETHTest:testFallbackDeposit(uint256) (runs: 256, μ: 63061, ~: 65604) +WETHTest:testFallbackDeposit(uint256) (runs: 256, μ: 62879, ~: 65604) WETHTest:testPartialWithdraw() (gas: 73281) WETHTest:testWithdraw() (gas: 54360) -WETHTest:testWithdraw(uint256,uint256) (runs: 256, μ: 75391, ~: 78076) \ No newline at end of file +WETHTest:testWithdraw(uint256,uint256) (runs: 256, μ: 75313, ~: 78076) \ No newline at end of file From 79afb81b5e873dbfbf3c4773e7ebb9eb03b3f14c Mon Sep 17 00:00:00 2001 From: Joshua Trujillo Date: Thu, 23 Nov 2023 10:18:57 -0800 Subject: [PATCH 3/4] interfaceid --- src/tokens/ERC6909.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tokens/ERC6909.sol b/src/tokens/ERC6909.sol index 13c778f5..15b4f307 100644 --- a/src/tokens/ERC6909.sol +++ b/src/tokens/ERC6909.sol @@ -89,7 +89,7 @@ abstract contract ERC6909 { function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 - interfaceId == 0xb2e69f8a; // ERC165 Interface ID for ERC6909 + interfaceId == 0x0f632fb3; // ERC165 Interface ID for ERC6909 } /*////////////////////////////////////////////////////////////// From 3d98a4a4beb6d8a80e74b90411dbb133f34c7eac Mon Sep 17 00:00:00 2001 From: Joshua Trujillo Date: Thu, 23 Nov 2023 10:19:05 -0800 Subject: [PATCH 4/4] snap --- .gas-snapshot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index fb227d5f..13e2410a 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -167,7 +167,7 @@ ERC4626Test:testWithdrawZero() (gas: 52468) ERC6909Test:testApprove() (gas: 31572) ERC6909Test:testApprove(address,uint256,uint256) (runs: 256, μ: 30860, ~: 31793) ERC6909Test:testBurn() (gas: 35411) -ERC6909Test:testBurn(address,uint256,uint256) (runs: 256, μ: 23770, ~: 24148) +ERC6909Test:testBurn(address,uint256,uint256) (runs: 256, μ: 23773, ~: 24153) ERC6909Test:testFailMintBalanceOverflow() (gas: 31727) ERC6909Test:testFailTransferBalanceOverflow() (gas: 85598) ERC6909Test:testFailTransferBalanceOverflow(address,address,uint256,uint256) (runs: 256, μ: 87909, ~: 87909) @@ -186,7 +186,7 @@ ERC6909Test:testSetOperator(address,bool) (runs: 256, μ: 22873, ~: 31411) ERC6909Test:testTransfer() (gas: 61874) ERC6909Test:testTransfer(address,address,uint256,uint256,uint256) (runs: 256, μ: 59908, ~: 64506) ERC6909Test:testTransferFromAsOperator() (gas: 87418) -ERC6909Test:testTransferFromAsOperator(address,address,uint256,uint256,uint256) (runs: 256, μ: 85273, ~: 90112) +ERC6909Test:testTransferFromAsOperator(address,address,uint256,uint256,uint256) (runs: 256, μ: 85351, ~: 90112) ERC6909Test:testTransferFromWithApproval() (gas: 91890) ERC6909Test:testTransferFromWithApproval(address,address,uint256,uint256,uint256) (runs: 256, μ: 88775, ~: 94697) ERC6909Test:testTransferFromWithInfiniteApproval() (gas: 91541)