Skip to content

Commit

Permalink
feat: use built-in gas snapshots (#313)
Browse files Browse the repository at this point in the history
* feat: use built-in gas snapshots

This commit updates to use the gas snapshots built into forge instead of
the GasSnapshot library

* fix: naming

* fix: remove unnecessary base snaps
  • Loading branch information
marktoda authored Oct 30, 2024
1 parent c145fa4 commit 9ba6ffd
Show file tree
Hide file tree
Showing 121 changed files with 207 additions and 219 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 @@
{
"BaseExecuteSingleWithFee": "176379",
"ExecuteBatch": "188624",
"ExecuteBatchMultipleOutputs": "197968",
"ExecuteBatchMultipleOutputsDifferentTokens": "251215",
"ExecuteBatchNativeOutput": "184650",
"ExecuteSingle": "142762",
"ExecuteSingleNativeOutput": "130824",
"ExecuteSingleValidation": "152072",
"RevertInvalidNonce": "22192"
}
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 @@
{
"BaseExecuteSingleWithFee": "176480",
"ExecuteBatch": "188814",
"ExecuteBatchMultipleOutputs": "198158",
"ExecuteBatchMultipleOutputsDifferentTokens": "251405",
"ExecuteBatchNativeOutput": "184840",
"ExecuteSingle": "142871",
"ExecuteSingleNativeOutput": "130933",
"ExecuteSingleValidation": "152181",
"RevertInvalidNonce": "22290"
}
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 @@
{
"BaseExecuteSingleWithFee": "172831",
"ExecuteBatch": "181452",
"ExecuteBatchMultipleOutputs": "189990",
"ExecuteBatchMultipleOutputsDifferentTokens": "242428",
"ExecuteBatchNativeOutput": "177478",
"ExecuteSingle": "139215",
"ExecuteSingleNativeOutput": "127277",
"ExecuteSingleValidation": "148525",
"RevertInvalidNonce": "18656"
}
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 @@
{
"BaseExecuteSingleWithFee": "178696",
"ExecuteBatch": "193279",
"ExecuteBatchMultipleOutputs": "202497",
"ExecuteBatchMultipleOutputsDifferentTokens": "255617",
"ExecuteBatchNativeOutput": "189305",
"ExecuteSingle": "145087",
"ExecuteSingleNativeOutput": "133149",
"ExecuteSingleValidation": "154397",
"InputPriorityFee": "147392",
"OutputPriorityFee": "147396",
"OutputPriorityFeeAndBaselinePriorityFee": "147396",
"OverrideAuctionTargetBlock": "124529",
"RevertInvalidNonce": "8853"
}
Loading

0 comments on commit 9ba6ffd

Please sign in to comment.