Skip to content

Commit

Permalink
feat: use built-in gas snapshots
Browse files Browse the repository at this point in the history
This commit updates to use the gas snapshots built into forge instead of
the GasSnapshot library
  • Loading branch information
marktoda committed Oct 23, 2024
1 parent c145fa4 commit 605fa98
Show file tree
Hide file tree
Showing 121 changed files with 228 additions and 217 deletions.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-DutchOrder-ExecuteBatch.snap

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-DutchOrder-ExecuteSingle.snap

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-DutchOrder-RevertInvalidNonce.snap

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-LimitOrderReactor-ExecuteBatch.snap

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-LimitOrderReactor-ExecuteSingle.snap

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V2DutchOrder-ExclusiveFiller.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V2DutchOrder-ExecuteBatch.snap

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V2DutchOrder-ExecuteSingle.snap

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V2DutchOrder-InputOverride.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V2DutchOrder-OutputOverride.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V2DutchOrder-RevertInvalidNonce.snap

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V3DutchOrder-ExecuteBatch.snap

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V3DutchOrder-ExecuteSingle.snap

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V3DutchOrder-InputOverride.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V3DutchOrder-RevertInvalidNonce.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V3DutchOrder-V3-ExclusiveFiller.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V3DutchOrder-V3-InputOverride.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/Base-V3DutchOrder-V3-OutputOverride.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/DirectFillerFillMacroSingleOrder.snap

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/DirectFillerFillMacroTestEth1Output.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/DirectFillerFillMacroTestEth2Outputs.snap

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/DirectFillerFillMacroTwoOrders.snap

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/EthOutputTestEthOutput.snap

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/ProtocolFeesGasComparisonTest-NoFees.snap

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/SwapRouter02ExecutorExecute.snap

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecay.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayBounded.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayFullyDecayed.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayFullyDecayedNegative.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayNegative.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayNoDecay.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayNoDecayYet.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayNoDecayYetNegative.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-DutchDecayRange.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-ExtendedMultiPointDutchDecay.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-LocateCurvePositionMulti.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-LocateCurvePositionSingle.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/V3-MultiPointDutchDecay.snap

This file was deleted.

1 change: 0 additions & 1 deletion .forge-snapshots/testExclusiveFillerSucceeds.snap

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
[submodule "lib/solmate"]
path = lib/solmate
url = https://github.com/transmissions11/solmate
[submodule "lib/forge-gas-snapshot"]
path = lib/forge-gas-snapshot
url = https://github.com/marktoda/forge-gas-snapshot
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/openzeppelin/openzeppelin-contracts
Expand Down
1 change: 0 additions & 1 deletion lib/forge-gas-snapshot
Submodule forge-gas-snapshot deleted from 774be2
6 changes: 6 additions & 0 deletions snapshots/DirectFillerFillMacroTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"DirectFillerFillMacroSingleOrder": "135973",
"DirectFillerFillMacroSingleOrderWithFee": "174570",
"DirectFillerFillMacroThreeOrdersWithFees": "433904",
"DirectFillerFillMacroTwoOrders": "255553"
}
11 changes: 11 additions & 0 deletions snapshots/DutchOrderReactorTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Base-DutchOrder-BaseExecuteSingleWithFee": "181438",
"Base-DutchOrder-ExecuteBatch": "196244",
"Base-DutchOrder-ExecuteBatchMultipleOutputs": "205893",
"Base-DutchOrder-ExecuteBatchMultipleOutputsDifferentTokens": "259435",
"Base-DutchOrder-ExecuteBatchNativeOutput": "189770",
"Base-DutchOrder-ExecuteSingle": "147820",
"Base-DutchOrder-ExecuteSingleNativeOutput": "133383",
"Base-DutchOrder-ExecuteSingleValidation": "157131",
"Base-DutchOrder-RevertInvalidNonce": "26372"
}
4 changes: 4 additions & 0 deletions snapshots/EthOutputDirectFillerTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"DirectFillerFillMacroTestEth1Output": "147146",
"DirectFillerFillMacroTestEth2Outputs": "170234"
}
4 changes: 4 additions & 0 deletions snapshots/EthOutputMockFillContractTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"EthOutputTest3OrdersWithEthAndERC20Outputs": "362445",
"EthOutputTestEthOutput": "156342"
}
11 changes: 11 additions & 0 deletions snapshots/ExclusiveDutchOrderReactorTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Base-ExclusiveDutchOrder-BaseExecuteSingleWithFee": "181682",
"Base-ExclusiveDutchOrder-ExecuteBatch": "196730",
"Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputs": "206374",
"Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputsDifferentTokens": "259924",
"Base-ExclusiveDutchOrder-ExecuteBatchNativeOutput": "190250",
"Base-ExclusiveDutchOrder-ExecuteSingle": "148073",
"Base-ExclusiveDutchOrder-ExecuteSingleNativeOutput": "133635",
"Base-ExclusiveDutchOrder-ExecuteSingleValidation": "157383",
"Base-ExclusiveDutchOrder-RevertInvalidNonce": "26629"
}
3 changes: 3 additions & 0 deletions snapshots/ExclusiveFillerValidationTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"testExclusiveFillerSucceeds": "171199"
}
11 changes: 11 additions & 0 deletions snapshots/LimitOrderReactorTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Base-LimitOrderReactor-BaseExecuteSingleWithFee": "177666",
"Base-LimitOrderReactor-ExecuteBatch": "188610",
"Base-LimitOrderReactor-ExecuteBatchMultipleOutputs": "197369",
"Base-LimitOrderReactor-ExecuteBatchMultipleOutputsDifferentTokens": "250029",
"Base-LimitOrderReactor-ExecuteBatchNativeOutput": "182131",
"Base-LimitOrderReactor-ExecuteSingle": "144054",
"Base-LimitOrderReactor-ExecuteSingleNativeOutput": "129612",
"Base-LimitOrderReactor-ExecuteSingleValidation": "153360",
"Base-LimitOrderReactor-RevertInvalidNonce": "22590"
}
12 changes: 12 additions & 0 deletions snapshots/NonlinearDutchDecayLibTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"V3-DutchDecay": "16413",
"V3-DutchDecayFullyDecayed": "7908",
"V3-DutchDecayFullyDecayedNegative": "7619",
"V3-DutchDecayNegative": "15389",
"V3-DutchDecayNoDecayYet": "5720",
"V3-DutchDecayNoDecayYetNegative": "5694",
"V3-ExtendedMultiPointDutchDecay": "106707",
"V3-LocateCurvePositionMulti": "17727",
"V3-LocateCurvePositionSingle": "4227",
"V3-MultiPointDutchDecay": "33868"
}
15 changes: 15 additions & 0 deletions snapshots/PriorityOrderReactorTest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Base-PriorityOrderReactor-BaseExecuteSingleWithFee": "184270",
"Base-PriorityOrderReactor-ExecuteBatch": "201986",
"Base-PriorityOrderReactor-ExecuteBatchMultipleOutputs": "211513",
"Base-PriorityOrderReactor-ExecuteBatchMultipleOutputsDifferentTokens": "264944",
"Base-PriorityOrderReactor-ExecuteBatchNativeOutput": "195506",
"Base-PriorityOrderReactor-ExecuteSingle": "150656",
"Base-PriorityOrderReactor-ExecuteSingleNativeOutput": "136223",
"Base-PriorityOrderReactor-ExecuteSingleValidation": "159971",
"Base-PriorityOrderReactor-InputPriorityFee": "152964",
"Base-PriorityOrderReactor-OutputPriorityFee": "152968",
"Base-PriorityOrderReactor-OutputPriorityFeeAndBaselinePriorityFee": "152962",
"Base-PriorityOrderReactor-OverrideAuctionTargetBlock": "130099",
"Base-PriorityOrderReactor-RevertInvalidNonce": "13608"
}
Loading

0 comments on commit 605fa98

Please sign in to comment.