Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try snapshot #201

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
150417
181978

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
146554
178116
2 changes: 1 addition & 1 deletion .forge-snapshots/Base-LimitOrderReactor-ExecuteSingle.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
124433
144333
185 changes: 185 additions & 0 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
DeployDutchTest:testDeploy() (gas: 3429000)
DeployExclusiveDutchTest:testDeploy() (gas: 3532081)
DirectFillerFillMacroTest:testFillDataPassed() (gas: 203257)
DirectFillerFillMacroTest:testFillerHasInsufficientOutput() (gas: 205252)
DirectFillerFillMacroTest:testFillerLacksApproval() (gas: 206354)
DirectFillerFillMacroTest:testSingleOrder() (gas: 263644)
DirectFillerFillMacroTest:testSingleOrderWithFee() (gas: 1053057)
DirectFillerFillMacroTest:testThreeOrdersWithFees() (gas: 1550847)
DirectFillerFillMacroTest:testTwoOrders() (gas: 465436)
DutchDecayLibTest:testDutchDecay() (gas: 5442)
DutchDecayLibTest:testDutchDecayBounded(uint256,uint256,uint256,uint256) (runs: 256, μ: 3829, ~: 3817)
DutchDecayLibTest:testDutchDecayFullyDecayed() (gas: 3734)
DutchDecayLibTest:testDutchDecayFullyDecayedNegative() (gas: 3722)
DutchDecayLibTest:testDutchDecayInvalidTimes(uint256,uint256,uint256,uint256) (runs: 256, μ: 3596, ~: 3596)
DutchDecayLibTest:testDutchDecayNegative() (gas: 5505)
DutchDecayLibTest:testDutchDecayNegative(uint256,uint256,uint256,uint256) (runs: 256, μ: 3827, ~: 3815)
DutchDecayLibTest:testDutchDecayNoDecay(uint256,uint256,uint256) (runs: 256, μ: 3373, ~: 3364)
DutchDecayLibTest:testDutchDecayNoDecayYet() (gas: 3778)
DutchDecayLibTest:testDutchDecayNoDecayYetNegative() (gas: 3779)
DutchOrderReactorExecuteTest:testBaseExecute() (gas: 333941)
DutchOrderReactorExecuteTest:testBaseExecute(uint128,uint128,uint256) (runs: 256, μ: 298715, ~: 303380)
DutchOrderReactorExecuteTest:testBaseExecuteBatch() (gas: 377040)
DutchOrderReactorExecuteTest:testBaseExecuteBatchMultipleOutputs() (gas: 440054)
DutchOrderReactorExecuteTest:testBaseExecuteBatchMultipleOutputsDifferentTokens() (gas: 526289)
DutchOrderReactorExecuteTest:testBaseExecuteBatchNativeOutput() (gas: 382804)
DutchOrderReactorExecuteTest:testBaseExecuteDeadlinePassed(uint128,uint128,uint256) (runs: 256, μ: 175366, ~: 182751)
DutchOrderReactorExecuteTest:testBaseExecuteInvalidReactor(address,uint128,uint128,uint256) (runs: 256, μ: 187001, ~: 190966)
DutchOrderReactorExecuteTest:testBaseExecuteNativeOutput() (gas: 320439)
DutchOrderReactorExecuteTest:testBaseExecuteNativeOutput(uint128,uint128,uint256) (runs: 256, μ: 241061, ~: 245194)
DutchOrderReactorExecuteTest:testBaseExecuteSignatureReplay() (gas: 381160)
DutchOrderReactorExecuteTest:testBaseExecuteTwoReactorsAtOnce() (gas: 3563485)
DutchOrderReactorExecuteTest:testBaseExecuteValidationContract() (gas: 390611)
DutchOrderReactorExecuteTest:testBaseExecuteValidationContract(uint128,uint128,uint256) (runs: 256, μ: 310362, ~: 315027)
DutchOrderReactorExecuteTest:testBaseExecuteValidationContractFail(uint128,uint128,uint256) (runs: 256, μ: 194767, ~: 198887)
DutchOrderReactorExecuteTest:testBaseExecuteWithFee() (gas: 475144)
DutchOrderReactorExecuteTest:testBaseExecuteWithFee(uint128,uint128,uint256,uint8) (runs: 256, μ: 368951, ~: 371154)
DutchOrderReactorExecuteTest:testBaseNonceReuse() (gas: 367352)
DutchOrderReactorExecuteTest:testExecuteBatchInsufficientOutput() (gas: 365292)
DutchOrderReactorExecuteTest:testExecuteBatchInsufficientOutputSent() (gas: 1078490)
DutchOrderReactorExecuteTest:testExecuteBatchInsufficientOutputSentNative() (gas: 1024928)
DutchOrderReactorExecuteTest:testExecuteBatchMultipleOutputs() (gas: 538035)
DutchOrderReactorValidationTest:testBothInputAndOutputDecay() (gas: 22343)
DutchOrderReactorValidationTest:testDecayNeverOutOfBounds(uint256,uint256,uint256,uint256) (runs: 256, μ: 27475, ~: 27458)
DutchOrderReactorValidationTest:testInputDecayIncorrectAmounts() (gas: 21287)
DutchOrderReactorValidationTest:testInputDecayNowBetweenStartAndEnd() (gas: 27394)
DutchOrderReactorValidationTest:testInputDecayStartTimeAfterNow() (gas: 27151)
DutchOrderReactorValidationTest:testInputDecaysCorrectlyWhenEndtimeLtNowLtDeadline() (gas: 27292)
DutchOrderReactorValidationTest:testInputDecaysCorrectlyWhenNowLtEndtimeLtDeadline() (gas: 27651)
DutchOrderReactorValidationTest:testOutputDecayIncorrectAmounts() (gas: 21862)
DutchOrderReactorValidationTest:testOutputDecaysCorrectlyWhenEndtimeEqNowLtDeadline() (gas: 26978)
DutchOrderReactorValidationTest:testOutputDecaysCorrectlyWhenEndtimeLtNowLtDeadline() (gas: 27010)
DutchOrderReactorValidationTest:testOutputDecaysCorrectlyWhenNowLtEndtimeLtDeadline() (gas: 27388)
DutchOrderReactorValidationTest:testResolveEndTimeAfterNow() (gas: 27392)
DutchOrderReactorValidationTest:testResolveFirstDecay() (gas: 45546)
DutchOrderReactorValidationTest:testResolveMultipleDutchOutputs() (gas: 34164)
DutchOrderReactorValidationTest:testResolveStartTimeEqualsNow() (gas: 27047)
DutchOrderReactorValidationTest:testStartAmountLessThanEndAmount() (gas: 21900)
DutchOrderReactorValidationTest:testValidateDutchEndTimeAfterStart() (gas: 23802)
DutchOrderReactorValidationTest:testValidateDutchEndTimeBeforeStart() (gas: 21208)
DutchOrderReactorValidationTest:testValidateEndTimeAfterDeadline() (gas: 20769)
EthOutputDirectFillerTest:test2EthOutputOrdersButOnlyEnoughEthToFill1() (gas: 243383)
EthOutputDirectFillerTest:test3OrdersWithEthAndERC20OutputsDirectFill() (gas: 444264)
EthOutputDirectFillerTest:testEth1Output() (gas: 264834)
EthOutputDirectFillerTest:testEth1OutputInsufficientEthSent() (gas: 188867)
EthOutputDirectFillerTest:testEth2Outputs() (gas: 319420)
EthOutputDirectFillerTest:testExcessETHIsReturned() (gas: 222087)
EthOutputMockFillContractTest:test3OrdersWithEthAndERC20Outputs() (gas: 573349)
EthOutputMockFillContractTest:test3OrdersWithEthAndERC20OutputsWithInsufficientEth() (gas: 429049)
EthOutputMockFillContractTest:test3OrdersWithEthAndERC20OutputsWithInsufficientEthInFillContractButEnoughInReactor() (gas: 427122)
EthOutputMockFillContractTest:testEthOutput() (gas: 229208)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecute() (gas: 378864)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecute(uint128,uint128,uint256) (runs: 256, μ: 298492, ~: 303623)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteBatch() (gas: 422270)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteBatchMultipleOutputs() (gas: 440603)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteBatchMultipleOutputsDifferentTokens() (gas: 549240)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteBatchNativeOutput() (gas: 383414)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteDeadlinePassed(uint128,uint128,uint256) (runs: 256, μ: 175404, ~: 182789)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteInvalidReactor(address,uint128,uint128,uint256) (runs: 256, μ: 188220, ~: 191874)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteNativeOutput() (gas: 320749)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteNativeOutput(uint128,uint128,uint256) (runs: 256, μ: 241205, ~: 245504)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteSignatureReplay() (gas: 381704)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteTwoReactorsAtOnce() (gas: 3667256)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteValidationContract() (gas: 390921)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteValidationContract(uint128,uint128,uint256) (runs: 256, μ: 310861, ~: 315292)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteValidationContractFail(uint128,uint128,uint256) (runs: 256, μ: 195930, ~: 199817)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteWithFee() (gas: 475450)
ExclusiveDutchOrderReactorExecuteTest:testBaseExecuteWithFee(uint128,uint128,uint256,uint8) (runs: 256, μ: 368688, ~: 371401)
ExclusiveDutchOrderReactorExecuteTest:testBaseNonceReuse() (gas: 367898)
ExclusiveDutchOrderReactorExecuteTest:testExclusivityMultipleOutputs(address,address,uint256,uint128[],uint256) (runs: 256, μ: 2037112, ~: 2073886)
ExclusiveDutchOrderReactorExecuteTest:testExclusivityOverride(address,address,uint256,uint128,uint256) (runs: 256, μ: 295157, ~: 296790)
ExclusiveDutchOrderReactorExecuteTest:testExclusivitySucceeds(address,uint128,uint128) (runs: 256, μ: 259148, ~: 262569)
ExclusiveDutchOrderReactorExecuteTest:testExecuteBatchInsufficientOutput() (gas: 365382)
ExclusiveDutchOrderReactorExecuteTest:testExecuteBatchInsufficientOutputSent() (gas: 1056489)
ExclusiveDutchOrderReactorExecuteTest:testExecuteBatchInsufficientOutputSentNative() (gas: 979188)
ExclusiveDutchOrderReactorExecuteTest:testExecuteBatchMultipleOutputs() (gas: 538721)
ExclusiveFillerValidationTest:testExclusiveFillerSucceeds() (gas: 306407)
ExclusiveFillerValidationTest:testNonExclusiveFillerFails() (gas: 191618)
ExclusiveFillerValidationTest:testNonExclusiveFillerFailsOnLastExclusiveTimestamp() (gas: 191545)
ExclusiveFillerValidationTest:testNonExclusiveFillerSucceedsPastExclusiveTimestamp() (gas: 276074)
ExclusivityOverrideLibTest:testExclusivity(address) (runs: 256, μ: 9247, ~: 9247)
ExclusivityOverrideLibTest:testExclusivityFail(address,address,uint256,uint256) (runs: 256, μ: 10295, ~: 10295)
ExclusivityOverrideLibTest:testExclusivityPeriodOver(address,uint256,uint256) (runs: 256, μ: 9471, ~: 9471)
ExclusivityOverrideLibTest:testHandleOverride() (gas: 22549)
ExclusivityOverrideLibTest:testHandleOverrideApplied(address,address,uint256,uint128) (runs: 256, μ: 24300, ~: 24300)
ExclusivityOverrideLibTest:testHandleOverrideAppliedMultiOutput(address,address,uint256,uint128[]) (runs: 256, μ: 422640, ~: 417800)
ExclusivityOverrideLibTest:testHandleOverridePass(address,uint256,uint128) (runs: 256, μ: 22831, ~: 22832)
ExclusivityOverrideLibTest:testHandleOverridePassNoExclusivity(address,uint256,uint128) (runs: 256, μ: 22785, ~: 22785)
ExclusivityOverrideLibTest:testHandleOverridePassWindowPassed(address,address,uint256,uint128) (runs: 256, μ: 23858, ~: 23858)
ExclusivityOverrideLibTest:testHandleOverrideStrict(address,address,uint128) (runs: 256, μ: 23226, ~: 23226)
ExclusivityOverrideLibTest:testNoExclusivity(address,uint256,uint256) (runs: 256, μ: 9132, ~: 9132)
LimitOrderReactorTest:testBaseExecute() (gas: 302612)
LimitOrderReactorTest:testBaseExecute(uint128,uint128,uint256) (runs: 256, μ: 225403, ~: 227396)
LimitOrderReactorTest:testBaseExecuteBatch() (gas: 372036)
LimitOrderReactorTest:testBaseExecuteBatchMultipleOutputs() (gas: 388677)
LimitOrderReactorTest:testBaseExecuteBatchMultipleOutputsDifferentTokens() (gas: 495664)
LimitOrderReactorTest:testBaseExecuteBatchNativeOutput() (gas: 350302)
LimitOrderReactorTest:testBaseExecuteDeadlinePassed(uint128,uint128,uint256) (runs: 256, μ: 113205, ~: 115647)
LimitOrderReactorTest:testBaseExecuteInvalidReactor(address,uint128,uint128,uint256) (runs: 256, μ: 114892, ~: 116064)
LimitOrderReactorTest:testBaseExecuteNativeOutput() (gas: 278671)
LimitOrderReactorTest:testBaseExecuteNativeOutput(uint128,uint128,uint256) (runs: 256, μ: 200740, ~: 203387)
LimitOrderReactorTest:testBaseExecuteSignatureReplay() (gas: 297423)
LimitOrderReactorTest:testBaseExecuteTwoReactorsAtOnce() (gas: 3149068)
LimitOrderReactorTest:testBaseExecuteValidationContract() (gas: 314641)
LimitOrderReactorTest:testBaseExecuteValidationContract(uint128,uint128,uint256) (runs: 256, μ: 237048, ~: 239041)
LimitOrderReactorTest:testBaseExecuteValidationContractFail(uint128,uint128,uint256) (runs: 256, μ: 122656, ~: 123981)
LimitOrderReactorTest:testBaseExecuteWithFee() (gas: 399175)
LimitOrderReactorTest:testBaseExecuteWithFee(uint128,uint128,uint256,uint8) (runs: 256, μ: 298961, ~: 295145)
LimitOrderReactorTest:testBaseNonceReuse() (gas: 283570)
LimitOrderReactorTest:testExecuteIncorrectSpender() (gas: 120111)
LimitOrderReactorTest:testExecuteIncorrectToken() (gas: 119397)
LimitOrderReactorTest:testExecuteInsufficientOutput() (gas: 946746)
LimitOrderReactorTest:testExecuteInsufficientPermit() (gas: 119444)
LimitOrderReactorTest:testExecuteWithDuplicateOutputs() (gas: 223102)
LimitOrderReactorTest:testExecuteWithFeeOutput() (gas: 976974)
LimitOrderReactorTest:testExecuteWithValidationContract() (gas: 211439)
LimitOrderReactorTest:testExecuteWithValidationContractChangeSig() (gas: 121751)
OrderQuoterTest:testGetReactorDutchOrder() (gas: 14476)
OrderQuoterTest:testGetReactorLimitOrder() (gas: 15969)
OrderQuoterTest:testGetReactorMockOrder() (gas: 9210)
OrderQuoterTest:testQuoteDutchOrder() (gas: 174565)
OrderQuoterTest:testQuoteDutchOrderAfterInputDecay() (gas: 175709)
OrderQuoterTest:testQuoteDutchOrderAfterOutputDecay() (gas: 175503)
OrderQuoterTest:testQuoteDutchOrderEndBeforeStart() (gas: 84814)
OrderQuoterTest:testQuoteLimitOrder() (gas: 168374)
OrderQuoterTest:testQuoteLimitOrderDeadlinePassed() (gas: 88091)
OrderQuoterTest:testQuoteLimitOrderInsufficientBalance() (gas: 127675)
ProtocolFeesGasComparisonTest:testInterfaceAndProtocolFee() (gas: 342064)
ProtocolFeesGasComparisonTest:testInterfaceAndProtocolFeeEthOutput() (gas: 293380)
ProtocolFeesGasComparisonTest:testInterfaceFee() (gas: 300011)
ProtocolFeesGasComparisonTest:testInterfaceFeeEthOutput() (gas: 247254)
ProtocolFeesGasComparisonTest:testNoFees() (gas: 261899)
ProtocolFeesGasComparisonTest:testNoFeesEthOutput() (gas: 224870)
ProtocolFeesTest:testSetFeeController() (gas: 22579)
ProtocolFeesTest:testSetFeeControllerOnlyOwner() (gas: 16924)
ProtocolFeesTest:testTakeFees() (gas: 62126)
ProtocolFeesTest:testTakeFeesDuplicate() (gas: 704622)
ProtocolFeesTest:testTakeFeesFuzzOutputs(uint128,uint128[],uint256) (runs: 256, μ: 649797, ~: 595500)
ProtocolFeesTest:testTakeFeesInvalidFeeToken() (gas: 624249)
ProtocolFeesTest:testTakeFeesMultipleOutputTokens() (gas: 93990)
ProtocolFeesTest:testTakeFeesMultipleOutputTokensWithInterfaceFee() (gas: 76778)
ProtocolFeesTest:testTakeFeesMultipleOutputTokensWithInterfaceFeeBothFees() (gas: 103164)
ProtocolFeesTest:testTakeFeesMultipleOutputTokensWithInterfaceFeeBothFeesChangeOrder() (gas: 103358)
ProtocolFeesTest:testTakeFeesMultipleOutputTokensWithInterfaceFeeChangeOrder() (gas: 76799)
ProtocolFeesTest:testTakeFeesNoFees() (gas: 33331)
ProtocolFeesTest:testTakeFeesTooMuch() (gas: 67028)
ProtocolFeesTest:testTakeFeesWithInterfaceFee() (gas: 66563)
ResolvedOrderLibTest:testDeadlinePassed() (gas: 79950)
ResolvedOrderLibTest:testExclusiveFillerValidationInvalidFiller() (gas: 330847)
ResolvedOrderLibTest:testExclusiveFillerValidationInvalidFillerPastTimestamp() (gas: 329958)
ResolvedOrderLibTest:testExclusiveFillerValidationValidFillerPastTimestamp() (gas: 330016)
ResolvedOrderLibTest:testInvalidReactor() (gas: 59161)
ResolvedOrderLibTest:testValid() (gas: 76439)
ResolvedOrderLibTest:testValidationContractInvalid() (gas: 419592)
ResolvedOrderLibTest:testValidationContractValid() (gas: 436660)
SwapRouter02ExecutorTest:testExecute() (gas: 351736)
SwapRouter02ExecutorTest:testExecuteAlreadyApproved() (gas: 494272)
SwapRouter02ExecutorTest:testExecuteBatch() (gas: 420871)
SwapRouter02ExecutorTest:testExecuteInsufficientOutput() (gas: 352828)
SwapRouter02ExecutorTest:testMsgSenderNotReactor() (gas: 126721)
SwapRouter02ExecutorTest:testNotWhitelistedCaller() (gas: 143385)
SwapRouter02ExecutorTest:testReactorCallback() (gas: 209950)
SwapRouter02ExecutorTest:testUnwrapWETH() (gas: 183032)
SwapRouter02ExecutorTest:testUnwrapWETHNotOwner() (gas: 10957)
SwapRouter02ExecutorTest:testWithdrawETH() (gas: 15240)
SwapRouter02ExecutorTest:testWithdrawETHNotOwner() (gas: 10922)
29 changes: 29 additions & 0 deletions .github/workflows/gas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Gas

on:
push:
branches:
- main
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build

- name: Check gas snapshots
run: forge snapshot --check
Loading
Loading