diff --git a/.gas-snapshot b/.gas-snapshot index c0d4c1b3..10409183 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,206 +1,207 @@ -BatchCallbackTest:testBatchCallWithCallback() (gas: 113046) -BatchExecutorTest:testBatchExecuteWithPartialFailures() (gas: 120248) -BatchExecutorTest:testBatchExecuteWithPartialFailuresDoesNotRevertIfAnyCallsRevert() (gas: 97967) -BatchExecutorTest:testBatchExecuteWithoutPartialFailures() (gas: 120555) -BatchExecutorTest:testBatchExecuteWithoutPartialFailuresRevertsIfAnyCallsRevert() (gas: 95516) -CallbacksTest:testAllowNestedCallbacks() (gas: 115811) -CallbacksTest:testCallbackFromCounter() (gas: 69183) -CallbacksTest:testCallcodeReentrancyExploitWithProtectedScript() (gas: 64790) -CallbacksTest:testCallcodeReentrancyExploitWithUnprotectedScript() (gas: 70779) -CallbacksTest:testCallcodeReentrancyProtectionWithProtectedScript() (gas: 113241) -CallbacksTest:testNestedCallWithNoCallbackSucceeds() (gas: 109049) -CallbacksTest:testPayableCallback() (gas: 76729) -CallbacksTest:testRevertsOnCallbackWhenNoActiveCallback() (gas: 72391) -CallbacksTest:testSimpleCallback() (gas: 247105) -CallbacksTest:testWithClearedCallback() (gas: 137539) -CallbacksTest:testWithoutAllowCallback() (gas: 137308) -CodeJarTest:testCodeJarCanBeWacky() (gas: 133917) -CodeJarTest:testCodeJarCanDeployCodeThatHadEthSent() (gas: 4705748) -CodeJarTest:testCodeJarCounter() (gas: 349138) -CodeJarTest:testCodeJarDeployNotAffectedByChangedCodeHash() (gas: 1005025) -CodeJarTest:testCodeJarDeploysAnother() (gas: 212161) -CodeJarTest:testCodeJarDifferentZeros() (gas: 1935201) -CodeJarTest:testCodeJarFirstDeploy() (gas: 968124) -CodeJarTest:testCodeJarInputVariety() (gas: 19788591) -CodeJarTest:testCodeJarLarge() (gas: 73621689) -CodeJarTest:testCodeJarRefusesToDeployEmptyCode() (gas: 2820030) -CodeJarTest:testCodeJarSecondDeploy() (gas: 970419) -CodeJarTest:testCodeJarSelfDestruct() (gas: 974534) -CodeJarTest:testCodeJarStoresSelfReference() (gas: 105606) -CodeJarTest:testCodeJarTickCounter() (gas: 162059) -CodeJarTest:testRevertsOnConstructorRevert() (gas: 85595) -CodeJarTest:testRevertsOnSelfDestructingConstructor() (gas: 54228) -ConditionalMulticallTest:testConditionalRunEmptyInputIsValid() (gas: 45625) -ConditionalMulticallTest:testConditionalRunInvalidInput() (gas: 45725) -ConditionalMulticallTest:testConditionalRunMulticallError() (gas: 289702) -ConditionalMulticallTest:testConditionalRunOnPeriodicRepay() (gas: 292132) -ConditionalMulticallTest:testConditionalRunPassed() (gas: 268006) -ConditionalMulticallTest:testConditionalRunUnmet() (gas: 79693) -EIP1271Test:testReturnsMagicValueForValidSignature() (gas: 69743) -EIP1271Test:testRevertsIfSignerContractDoesNotReturnMagic() (gas: 17088) -EIP712Test:testExecuteQuarkOperation() (gas: 70970) -EIP712Test:testRequirements() (gas: 165373) -EIP712Test:testRevertBadRequirements() (gas: 24146) -EIP712Test:testRevertsForBadCalldata() (gas: 19472) -EIP712Test:testRevertsForBadCode() (gas: 21433) -EIP712Test:testRevertsForBadExpiry() (gas: 19780) -EIP712Test:testRevertsForExpiredSignature() (gas: 12708) -EIP712Test:testRevertsInvalidS() (gas: 16378) -EIP712Test:testRevertsOnReusedNonce() (gas: 82781) +BatchCallbackTest:testBatchCallWithCallback() (gas: 111870) +BatchExecutorTest:testBatchExecuteWithPartialFailures() (gas: 118919) +BatchExecutorTest:testBatchExecuteWithPartialFailuresDoesNotRevertIfAnyCallsRevert() (gas: 96677) +BatchExecutorTest:testBatchExecuteWithoutPartialFailures() (gas: 119226) +BatchExecutorTest:testBatchExecuteWithoutPartialFailuresRevertsIfAnyCallsRevert() (gas: 94313) +CallbacksTest:testAllowNestedCallbacks() (gas: 114661) +CallbacksTest:testCallbackFromCounter() (gas: 68480) +CallbacksTest:testCallcodeReentrancyExploitWithProtectedScript() (gas: 64056) +CallbacksTest:testCallcodeReentrancyExploitWithUnprotectedScript() (gas: 70075) +CallbacksTest:testCallcodeReentrancyProtectionWithProtectedScript() (gas: 111899) +CallbacksTest:testNestedCallWithNoCallbackSucceeds() (gas: 107942) +CallbacksTest:testNestedCallbackResetsCallbackSlot() (gas: 85521) +CallbacksTest:testPayableCallback() (gas: 76018) +CallbacksTest:testRevertsOnCallbackWhenNoActiveCallback() (gas: 71691) +CallbacksTest:testSimpleCallback() (gas: 283157) +CallbacksTest:testWithClearedCallback() (gas: 155482) +CallbacksTest:testWithoutAllowCallback() (gas: 155251) +CodeJarTest:testCodeJarCanBeWacky() (gas: 114646) +CodeJarTest:testCodeJarCanDeployCodeThatHadEthSent() (gas: 6153300) +CodeJarTest:testCodeJarCounter() (gas: 466199) +CodeJarTest:testCodeJarDeployNotAffectedByChangedCodeHash() (gas: 1294230) +CodeJarTest:testCodeJarDeploysAnother() (gas: 246581) +CodeJarTest:testCodeJarDifferentZeros() (gas: 2513977) +CodeJarTest:testCodeJarFirstDeploy() (gas: 1257620) +CodeJarTest:testCodeJarInputVariety() (gas: 25862333) +CodeJarTest:testCodeJarLarge() (gas: 73911154) +CodeJarTest:testCodeJarRefusesToDeployEmptyCode() (gas: 3688707) +CodeJarTest:testCodeJarSecondDeploy() (gas: 1259810) +CodeJarTest:testCodeJarSelfDestruct() (gas: 1263907) +CodeJarTest:testCodeJarStoresSelfReference() (gas: 121367) +CodeJarTest:testCodeJarTickCounter() (gas: 198471) +CodeJarTest:testRevertsOnConstructorRevert() (gas: 85038) +CodeJarTest:testRevertsOnSelfDestructingConstructor() (gas: 53921) +ConditionalMulticallTest:testConditionalRunEmptyInputIsValid() (gas: 45059) +ConditionalMulticallTest:testConditionalRunInvalidInput() (gas: 45159) +ConditionalMulticallTest:testConditionalRunMulticallError() (gas: 288896) +ConditionalMulticallTest:testConditionalRunOnPeriodicRepay() (gas: 276623) +ConditionalMulticallTest:testConditionalRunPassed() (gas: 267062) +ConditionalMulticallTest:testConditionalRunUnmet() (gas: 76965) +EIP1271Test:testReturnsMagicValueForValidSignature() (gas: 68943) +EIP1271Test:testRevertsIfSignerContractDoesNotReturnMagic() (gas: 16375) +EIP712Test:testExecuteQuarkOperation() (gas: 70248) +EIP712Test:testRequirements() (gas: 163434) +EIP712Test:testRevertBadRequirements() (gas: 23602) +EIP712Test:testRevertsForBadCalldata() (gas: 18928) +EIP712Test:testRevertsForBadCode() (gas: 20711) +EIP712Test:testRevertsForBadExpiry() (gas: 19236) +EIP712Test:testRevertsForExpiredSignature() (gas: 12239) +EIP712Test:testRevertsInvalidS() (gas: 15849) +EIP712Test:testRevertsOnReusedNonce() (gas: 81528) EIP712Test:testStructHash() (gas: 9223372036854754743) -EthcallTest:testEthcallCallReraiseError() (gas: 54102) -EthcallTest:testEthcallCounter() (gas: 65854) -EthcallTest:testEthcallShouldReturnCallResult() (gas: 46717) -EthcallTest:testEthcallSupplyUSDCToComet() (gas: 154299) -EthcallTest:testEthcallWithdrawUSDCFromComet() (gas: 307596) -ExecutorTest:testExecutorCanDirectCall() (gas: 101209) -ExecutorTest:testExecutorCanDirectCallBySig() (gas: 104404) -MulticallTest:testCallcodeToMulticallSucceedsWhenUninitialized() (gas: 73864) -MulticallTest:testCreateSubWalletAndExecute() (gas: 596442) -MulticallTest:testEmptyInputIsValid() (gas: 45286) -MulticallTest:testExecutorCanMulticallAcrossSubwallets() (gas: 253358) -MulticallTest:testInvalidInput() (gas: 45497) -MulticallTest:testInvokeCounterTwice() (gas: 74018) -MulticallTest:testMulticallError() (gas: 284883) -MulticallTest:testMulticallShouldReturnCallResults() (gas: 76709) -MulticallTest:testRevertsForInvalidCallContext() (gas: 11778) -MulticallTest:testSupplyWETHWithdrawUSDCOnComet() (gas: 247623) -NoncerTest:testGetActiveNonceNested() (gas: 87683) -NoncerTest:testGetActiveNonceReplayable() (gas: 65580) -NoncerTest:testGetActiveNonceSingle() (gas: 44706) -NoncerTest:testGetActiveReplayCount() (gas: 85199) -NoncerTest:testGetActiveReplayCountNested() (gas: 88009) -NoncerTest:testGetActiveReplayCountSingle() (gas: 44517) -NoncerTest:testGetActiveReplayCountWithNonReplaySoftCancel() (gas: 69133) -NoncerTest:testGetActiveSubmissionTokenNested() (gas: 87131) -NoncerTest:testGetActiveSubmissionTokenReplayable() (gas: 65474) -NoncerTest:testGetActiveSubmissionTokenSingle() (gas: 47510) -NoncerTest:testNestedPlayPullingActiveReplayCount() (gas: 504200) -NoncerTest:testPostNestReadsCorrectValue() (gas: 140533) -PaycallTest:testInitializeProperlyFromConstructor() (gas: 6509) -PaycallTest:testPaycallForPayWithUSDT() (gas: 116523) -PaycallTest:testPaycallForPayWithWBTC() (gas: 109666) -PaycallTest:testPaycallRevertsWhenCallReverts() (gas: 50407) -PaycallTest:testReturnCallResult() (gas: 86383) -PaycallTest:testRevertsForInvalidCallContext() (gas: 16102) -PaycallTest:testRevertsWhenCostIsMoreThanMaxPaymentCost() (gas: 96263) -PaycallTest:testSimpleCounterAndPayWithUSDC() (gas: 137730) -PaycallTest:testSimpleTransferTokenAndPayWithUSDC() (gas: 138990) -PaycallTest:testSupplyWETHWithdrawUSDCOnCometAndPayWithUSDC() (gas: 290956) -QuarkFactoryTest:testInvariantAddressesBetweenNonces() (gas: 2773010) -QuarkFactoryTest:testQuarkFactoryDeployToDeterministicAddresses() (gas: 2772738) -QuarkFactoryTest:testQuarkFactoryDeployTwice() (gas: 2801449) -QuarkMinimalProxyTest:testSignerExecutor() (gas: 61848) -QuarkNonceManagerTest:testCancelChain() (gas: 50401) -QuarkNonceManagerTest:testCancelExhaustedIsNoOp() (gas: 41156) -QuarkNonceManagerTest:testChangingReplayableness() (gas: 38646) -QuarkNonceManagerTest:testClaimsSequentialNonces() (gas: 13877370) -QuarkNonceManagerTest:testInvalidNonces() (gas: 15224) -QuarkNonceManagerTest:testIsSet() (gas: 31777) -QuarkNonceManagerTest:testNextNonceChain() (gas: 95315) -QuarkNonceManagerTest:testNonLinearNonce() (gas: 40662) -QuarkNonceManagerTest:testNonceOneIsValid() (gas: 35909) -QuarkNonceManagerTest:testPrecancelNonce() (gas: 38351) -QuarkNonceManagerTest:testRevertsDefenseInDepthReplayableSubmissionTokenZero() (gas: 40305) -QuarkNonceManagerTest:testRevertsIfNonceIsAlreadySet() (gas: 37110) -QuarkNonceManagerTest:testRevertsIfSubmittingNonMatchingNonceForNonReplayable() (gas: 19848) -QuarkNonceManagerTest:testSingleUseRandomValidNonce() (gas: 45655) -QuarkWalletProxyFactoryTest:testCreateAdditionalWalletWithSalt() (gas: 207145) -QuarkWalletProxyFactoryTest:testCreateAndExecuteCreatesWallet() (gas: 424213) -QuarkWalletProxyFactoryTest:testCreateAndExecuteMultiCreatesWallet() (gas: 476642) -QuarkWalletProxyFactoryTest:testCreateAndExecuteMultiWithSalt() (gas: 480674) -QuarkWalletProxyFactoryTest:testCreateAndExecuteSetsMsgSender() (gas: 214683) -QuarkWalletProxyFactoryTest:testCreateAndExecuteWithSalt() (gas: 426450) -QuarkWalletProxyFactoryTest:testCreateAndExecuteWithSaltSetsMsgSender() (gas: 360114) -QuarkWalletProxyFactoryTest:testCreateRevertsOnRepeat() (gas: 8937393460516733150) -QuarkWalletProxyFactoryTest:testCreatesWalletAtDeterministicAddress() (gas: 214396) -QuarkWalletProxyFactoryTest:testExecuteMultiOnExistingWallet() (gas: 474889) -QuarkWalletProxyFactoryTest:testExecuteOnExistingWallet() (gas: 422847) -QuarkWalletProxyFactoryTest:testExecutorIsOtherWallet() (gas: 281126) -QuarkWalletProxyFactoryTest:testExecutorSetInCreate() (gas: 102057) -QuarkWalletProxyFactoryTest:testVersion() (gas: 6074) -QuarkWalletTest:testAllowsForReusedNonceWithChangedScript() (gas: 99999) -QuarkWalletTest:testAtomicIncrementer() (gas: 68779) -QuarkWalletTest:testAtomicMaxCounterScript() (gas: 162544) -QuarkWalletTest:testAtomicPing() (gas: 46925) -QuarkWalletTest:testAtomicPingWithExternalSignature() (gas: 100238) -QuarkWalletTest:testCanReplaySameScriptWithDifferentCall() (gas: 155178) -QuarkWalletTest:testDirectExecuteFromEOA() (gas: 62635) -QuarkWalletTest:testDirectExecuteFromOtherQuarkWallet() (gas: 100822) -QuarkWalletTest:testDirectExecuteWithScriptSources() (gas: 303606) -QuarkWalletTest:testDisallowAllNullScriptAddress() (gas: 164253) -QuarkWalletTest:testEmitsEventsInDirectExecute() (gas: 41222) -QuarkWalletTest:testEmitsEventsInExecuteQuarkOperation() (gas: 91026) -QuarkWalletTest:testEmitsEventsInReplayableQuarkOperation() (gas: 94306) -QuarkWalletTest:testFailsWithRepeatNonceInDirectExecute() (gas: 90892) -QuarkWalletTest:testGetCodeJar() (gas: 11216) -QuarkWalletTest:testGetExecutor() (gas: 5485) -QuarkWalletTest:testGetNonceManager() (gas: 11150) -QuarkWalletTest:testGetSigner() (gas: 8579) -QuarkWalletTest:testHalfReplayableMultiQuarkOperation() (gas: 279150) -QuarkWalletTest:testMultiQuarkOperationCanCallMultipleOperationsWithOneSignature() (gas: 115330) -QuarkWalletTest:testPrecompileBigModExp() (gas: 45241) -QuarkWalletTest:testPrecompileBlake2F() (gas: 47653) -QuarkWalletTest:testPrecompileBn256Add() (gas: 46741) -QuarkWalletTest:testPrecompileBn256ScalarMul() (gas: 51725) -QuarkWalletTest:testPrecompileDataCopy() (gas: 54344) -QuarkWalletTest:testPrecompileEcRecover() (gas: 51109) -QuarkWalletTest:testPrecompileRipemd160() (gas: 46938) -QuarkWalletTest:testPrecompileSha256() (gas: 46748) -QuarkWalletTest:testQuarkOperationRevertsIfCallReverts() (gas: 45356) -QuarkWalletTest:testReadStorageForWallet() (gas: 162610) -QuarkWalletTest:testReplayableMultiQuarkOperation() (gas: 369919) -QuarkWalletTest:testReplayableMultiQuarkOperationWithSharedNonce() (gas: 250415) -QuarkWalletTest:testRequiresCorrectSubmissionToken() (gas: 124618) -QuarkWalletTest:testRevertOnAllPrecompilesDirectCall() (gas: 415118) -QuarkWalletTest:testRevertsForBadInputsInMultiQuarkOperation() (gas: 11805) -QuarkWalletTest:testRevertsForDirectExecuteByNonExecutorSigner() (gas: 12546) -QuarkWalletTest:testRevertsForNonceReuse() (gas: 83768) -QuarkWalletTest:testRevertsForRandomEmptyScriptAddress() (gas: 93737) -QuarkWalletTest:testRevertsForUnauthorizedDirectExecuteByRandomAddress() (gas: 14760) -QuarkWalletTest:testScriptCanBeCanceledByNewOp() (gas: 153480) -QuarkWalletTest:testScriptCanBeCanceledByNoOp() (gas: 128155) -QuarkWalletTest:testSetsMsgSender() (gas: 45563) -QuarkWalletTest:testSetsMsgSenderDuringDirectExecute() (gas: 38180) -QuotecallTest:testInitializeProperlyFromConstructor() (gas: 7166) -QuotecallTest:testQuotecallForPayWithUSDT() (gas: 116647) -QuotecallTest:testQuotecallForPayWithWBTC() (gas: 109874) -QuotecallTest:testQuotecallRevertsWhenCallReverts() (gas: 86744) -QuotecallTest:testReturnCallResult() (gas: 106475) -QuotecallTest:testRevertsForInvalidCallContext() (gas: 16077) -QuotecallTest:testRevertsWhenQuoteTooHigh() (gas: 132252) -QuotecallTest:testRevertsWhenQuoteTooLow() (gas: 132094) -QuotecallTest:testSimpleCounterAndPayWithUSDC() (gas: 137871) -QuotecallTest:testSimpleTransferTokenAndPayWithUSDC() (gas: 139143) -ReplayableTransactionsTest:testCancelRecurringPurchase() (gas: 249993) -ReplayableTransactionsTest:testRecurringPurchaseHappyPath() (gas: 198750) -ReplayableTransactionsTest:testRecurringPurchaseMultiplePurchases() (gas: 297155) -ReplayableTransactionsTest:testRecurringPurchaseWithDifferentCalldata() (gas: 486918) -ReplayableTransactionsTest:testRevertsForExpiredQuarkOperation() (gas: 9786) -ReplayableTransactionsTest:testRevertsForExpiredUniswapParams() (gas: 89451) -ReplayableTransactionsTest:testRevertsForPurchaseBeforeNextPurchasePeriod() (gas: 226133) -ReplayableTransactionsTest:testRevertsForPurchasingOverTheLimit() (gas: 226536) -RevertsTest:testRevertsInteger() (gas: 45121) -RevertsTest:testRevertsInvalidOpcode() (gas: 8660281895700907463) -RevertsTest:testRevertsOutOfGas() (gas: 302901) -RevertsTest:testRevertsWhenDividingByZero() (gas: 44965) -UniswapFlashLoanTest:testFlashLoanForCollateralSwapOnCompound() (gas: 370366) -UniswapFlashLoanTest:testRevertsForInsufficientFundsToRepayFlashLoan() (gas: 140032) -UniswapFlashLoanTest:testRevertsForInvalidCaller() (gas: 47143) -UniswapFlashLoanTest:testTokensOrderInvariant() (gas: 83062) -UniswapFlashSwapExactOutTest:testInvalidCallerFlashSwap() (gas: 47333) -UniswapFlashSwapExactOutTest:testNotEnoughToPayFlashSwap() (gas: 237417) -UniswapFlashSwapExactOutTest:testRevertsIfCalledDirectly() (gas: 105147) -UniswapFlashSwapExactOutTest:testUniswapFlashSwapExactOutLeverageComet() (gas: 312622) -isValidSignatureTest:testIsValidSignatureForEOAOwner() (gas: 13409) -isValidSignatureTest:testReturnsMagicValueForValidSignature() (gas: 9134) -isValidSignatureTest:testRevertsForEmptyContract() (gas: 11311) -isValidSignatureTest:testRevertsForInvalidSignature() (gas: 16668) -isValidSignatureTest:testRevertsForMessageWithoutDomainTypehash() (gas: 13998) -isValidSignatureTest:testRevertsForPermit2SignatureReuse() (gas: 65676) -isValidSignatureTest:testRevertsForPermit2SignatureWithoutDomainTypehash() (gas: 31170) -isValidSignatureTest:testRevertsForWrongSigner() (gas: 14044) -isValidSignatureTest:testRevertsIfSignatureExceeds65Bytes() (gas: 5680) -isValidSignatureTest:testRevertsIfSignerContractDoesNotReturnMagic() (gas: 9389) -isValidSignatureTest:testRevertsIfSignerContractReverts() (gas: 9129) -isValidSignatureTest:testRevertsInvalidS() (gas: 13252) \ No newline at end of file +EthcallTest:testEthcallCallReraiseError() (gas: 53439) +EthcallTest:testEthcallCounter() (gas: 65231) +EthcallTest:testEthcallShouldReturnCallResult() (gas: 46046) +EthcallTest:testEthcallSupplyUSDCToComet() (gas: 153076) +EthcallTest:testEthcallWithdrawUSDCFromComet() (gas: 305800) +ExecutorTest:testExecutorCanDirectCall() (gas: 100462) +ExecutorTest:testExecutorCanDirectCallBySig() (gas: 103567) +MulticallTest:testCallcodeToMulticallSucceedsWhenUninitialized() (gas: 73141) +MulticallTest:testCreateSubWalletAndExecute() (gas: 602442) +MulticallTest:testEmptyInputIsValid() (gas: 44705) +MulticallTest:testExecutorCanMulticallAcrossSubwallets() (gas: 251911) +MulticallTest:testInvalidInput() (gas: 44919) +MulticallTest:testInvokeCounterTwice() (gas: 73295) +MulticallTest:testMulticallError() (gas: 281794) +MulticallTest:testMulticallShouldReturnCallResults() (gas: 75776) +MulticallTest:testRevertsForInvalidCallContext() (gas: 11543) +MulticallTest:testSupplyWETHWithdrawUSDCOnComet() (gas: 246724) +NoncerTest:testGetActiveNonceNested() (gas: 86412) +NoncerTest:testGetActiveNonceReplayable() (gas: 64452) +NoncerTest:testGetActiveNonceSingle() (gas: 44105) +NoncerTest:testGetActiveReplayCount() (gas: 83506) +NoncerTest:testGetActiveReplayCountNested() (gas: 86707) +NoncerTest:testGetActiveReplayCountSingle() (gas: 43914) +NoncerTest:testGetActiveReplayCountWithNonReplaySoftCancel() (gas: 67984) +NoncerTest:testGetActiveSubmissionTokenNested() (gas: 85921) +NoncerTest:testGetActiveSubmissionTokenReplayable() (gas: 64410) +NoncerTest:testGetActiveSubmissionTokenSingle() (gas: 46887) +NoncerTest:testNestedPlayPullingActiveReplayCount() (gas: 603675) +NoncerTest:testPostNestReadsCorrectValue() (gas: 139064) +PaycallTest:testInitializeProperlyFromConstructor() (gas: 6368) +PaycallTest:testPaycallForPayWithUSDT() (gas: 115682) +PaycallTest:testPaycallForPayWithWBTC() (gas: 108822) +PaycallTest:testPaycallRevertsWhenCallReverts() (gas: 49661) +PaycallTest:testReturnCallResult() (gas: 85562) +PaycallTest:testRevertsForInvalidCallContext() (gas: 15789) +PaycallTest:testRevertsWhenCostIsMoreThanMaxPaymentCost() (gas: 95472) +PaycallTest:testSimpleCounterAndPayWithUSDC() (gas: 136730) +PaycallTest:testSimpleTransferTokenAndPayWithUSDC() (gas: 138085) +PaycallTest:testSupplyWETHWithdrawUSDCOnCometAndPayWithUSDC() (gas: 289853) +QuarkFactoryTest:testInvariantAddressesBetweenNonces() (gas: 3533049) +QuarkFactoryTest:testQuarkFactoryDeployToDeterministicAddresses() (gas: 3532780) +QuarkFactoryTest:testQuarkFactoryDeployTwice() (gas: 3565079) +QuarkMinimalProxyTest:testSignerExecutor() (gas: 60614) +QuarkNonceManagerTest:testCancelChain() (gas: 49553) +QuarkNonceManagerTest:testCancelExhaustedIsNoOp() (gas: 40796) +QuarkNonceManagerTest:testChangingReplayableness() (gas: 38431) +QuarkNonceManagerTest:testClaimsSequentialNonces() (gas: 13854737) +QuarkNonceManagerTest:testInvalidNonces() (gas: 14997) +QuarkNonceManagerTest:testIsSet() (gas: 31643) +QuarkNonceManagerTest:testNextNonceChain() (gas: 92598) +QuarkNonceManagerTest:testNonLinearNonce() (gas: 40308) +QuarkNonceManagerTest:testNonceOneIsValid() (gas: 35700) +QuarkNonceManagerTest:testPrecancelNonce() (gas: 37966) +QuarkNonceManagerTest:testRevertsDefenseInDepthReplayableSubmissionTokenZero() (gas: 40041) +QuarkNonceManagerTest:testRevertsIfNonceIsAlreadySet() (gas: 36842) +QuarkNonceManagerTest:testRevertsIfSubmittingNonMatchingNonceForNonReplayable() (gas: 19507) +QuarkNonceManagerTest:testSingleUseRandomValidNonce() (gas: 45067) +QuarkWalletProxyFactoryTest:testCreateAdditionalWalletWithSalt() (gas: 221844) +QuarkWalletProxyFactoryTest:testCreateAndExecuteCreatesWallet() (gas: 497760) +QuarkWalletProxyFactoryTest:testCreateAndExecuteMultiCreatesWallet() (gas: 549513) +QuarkWalletProxyFactoryTest:testCreateAndExecuteMultiWithSalt() (gas: 553527) +QuarkWalletProxyFactoryTest:testCreateAndExecuteSetsMsgSender() (gas: 216152) +QuarkWalletProxyFactoryTest:testCreateAndExecuteWithSalt() (gas: 499919) +QuarkWalletProxyFactoryTest:testCreateAndExecuteWithSaltSetsMsgSender() (gas: 368293) +QuarkWalletProxyFactoryTest:testCreateRevertsOnRepeat() (gas: 8937393460516733348) +QuarkWalletProxyFactoryTest:testCreatesWalletAtDeterministicAddress() (gas: 228594) +QuarkWalletProxyFactoryTest:testExecuteMultiOnExistingWallet() (gas: 547685) +QuarkWalletProxyFactoryTest:testExecuteOnExistingWallet() (gas: 496331) +QuarkWalletProxyFactoryTest:testExecutorIsOtherWallet() (gas: 332679) +QuarkWalletProxyFactoryTest:testExecutorSetInCreate() (gas: 109661) +QuarkWalletProxyFactoryTest:testVersion() (gas: 6017) +QuarkWalletTest:testAllowsForReusedNonceWithChangedScript() (gas: 98690) +QuarkWalletTest:testAtomicIncrementer() (gas: 68105) +QuarkWalletTest:testAtomicMaxCounterScript() (gas: 159699) +QuarkWalletTest:testAtomicPing() (gas: 46277) +QuarkWalletTest:testAtomicPingWithExternalSignature() (gas: 99371) +QuarkWalletTest:testCanReplaySameScriptWithDifferentCall() (gas: 151855) +QuarkWalletTest:testDirectExecuteFromEOA() (gas: 62162) +QuarkWalletTest:testDirectExecuteFromOtherQuarkWallet() (gas: 99916) +QuarkWalletTest:testDirectExecuteWithScriptSources() (gas: 370443) +QuarkWalletTest:testDisallowAllNullScriptAddress() (gas: 161439) +QuarkWalletTest:testEmitsEventsInDirectExecute() (gas: 40767) +QuarkWalletTest:testEmitsEventsInExecuteQuarkOperation() (gas: 89793) +QuarkWalletTest:testEmitsEventsInReplayableQuarkOperation() (gas: 92490) +QuarkWalletTest:testFailsWithRepeatNonceInDirectExecute() (gas: 90151) +QuarkWalletTest:testGetCodeJar() (gas: 11114) +QuarkWalletTest:testGetExecutor() (gas: 5396) +QuarkWalletTest:testGetNonceManager() (gas: 11048) +QuarkWalletTest:testGetSigner() (gas: 8477) +QuarkWalletTest:testHalfReplayableMultiQuarkOperation() (gas: 271754) +QuarkWalletTest:testMultiQuarkOperationCanCallMultipleOperationsWithOneSignature() (gas: 113755) +QuarkWalletTest:testPrecompileBigModExp() (gas: 44669) +QuarkWalletTest:testPrecompileBlake2F() (gas: 46973) +QuarkWalletTest:testPrecompileBn256Add() (gas: 46145) +QuarkWalletTest:testPrecompileBn256ScalarMul() (gas: 51129) +QuarkWalletTest:testPrecompileDataCopy() (gas: 52704) +QuarkWalletTest:testPrecompileEcRecover() (gas: 50444) +QuarkWalletTest:testPrecompileRipemd160() (gas: 46348) +QuarkWalletTest:testPrecompileSha256() (gas: 46107) +QuarkWalletTest:testQuarkOperationRevertsIfCallReverts() (gas: 44681) +QuarkWalletTest:testReadStorageForWallet() (gas: 159582) +QuarkWalletTest:testReplayableMultiQuarkOperation() (gas: 359530) +QuarkWalletTest:testReplayableMultiQuarkOperationWithSharedNonce() (gas: 243124) +QuarkWalletTest:testRequiresCorrectSubmissionToken() (gas: 121308) +QuarkWalletTest:testRevertOnAllPrecompilesDirectCall() (gas: 408251) +QuarkWalletTest:testRevertsForBadInputsInMultiQuarkOperation() (gas: 11248) +QuarkWalletTest:testRevertsForDirectExecuteByNonExecutorSigner() (gas: 12000) +QuarkWalletTest:testRevertsForNonceReuse() (gas: 82206) +QuarkWalletTest:testRevertsForRandomEmptyScriptAddress() (gas: 92764) +QuarkWalletTest:testRevertsForUnauthorizedDirectExecuteByRandomAddress() (gas: 14214) +QuarkWalletTest:testScriptCanBeCanceledByNewOp() (gas: 151007) +QuarkWalletTest:testScriptCanBeCanceledByNoOp() (gas: 125817) +QuarkWalletTest:testSetsMsgSender() (gas: 44949) +QuarkWalletTest:testSetsMsgSenderDuringDirectExecute() (gas: 37722) +QuotecallTest:testInitializeProperlyFromConstructor() (gas: 6996) +QuotecallTest:testQuotecallForPayWithUSDT() (gas: 115835) +QuotecallTest:testQuotecallForPayWithWBTC() (gas: 109056) +QuotecallTest:testQuotecallRevertsWhenCallReverts() (gas: 85944) +QuotecallTest:testReturnCallResult() (gas: 105654) +QuotecallTest:testRevertsForInvalidCallContext() (gas: 15764) +QuotecallTest:testRevertsWhenQuoteTooHigh() (gas: 131407) +QuotecallTest:testRevertsWhenQuoteTooLow() (gas: 131249) +QuotecallTest:testSimpleCounterAndPayWithUSDC() (gas: 136871) +QuotecallTest:testSimpleTransferTokenAndPayWithUSDC() (gas: 138238) +ReplayableTransactionsTest:testCancelRecurringPurchase() (gas: 247093) +ReplayableTransactionsTest:testRecurringPurchaseHappyPath() (gas: 197607) +ReplayableTransactionsTest:testRecurringPurchaseMultiplePurchases() (gas: 294081) +ReplayableTransactionsTest:testRecurringPurchaseWithDifferentCalldata() (gas: 480887) +ReplayableTransactionsTest:testRevertsForExpiredQuarkOperation() (gas: 9328) +ReplayableTransactionsTest:testRevertsForExpiredUniswapParams() (gas: 88363) +ReplayableTransactionsTest:testRevertsForPurchaseBeforeNextPurchasePeriod() (gas: 224147) +ReplayableTransactionsTest:testRevertsForPurchasingOverTheLimit() (gas: 224426) +RevertsTest:testRevertsInteger() (gas: 44470) +RevertsTest:testRevertsInvalidOpcode() (gas: 8660281895700907312) +RevertsTest:testRevertsOutOfGas() (gas: 302597) +RevertsTest:testRevertsWhenDividingByZero() (gas: 44311) +UniswapFlashLoanTest:testFlashLoanForCollateralSwapOnCompound() (gas: 368564) +UniswapFlashLoanTest:testRevertsForInsufficientFundsToRepayFlashLoan() (gas: 138836) +UniswapFlashLoanTest:testRevertsForInvalidCaller() (gas: 46379) +UniswapFlashLoanTest:testTokensOrderInvariant() (gas: 81825) +UniswapFlashSwapExactOutTest:testInvalidCallerFlashSwap() (gas: 46575) +UniswapFlashSwapExactOutTest:testNotEnoughToPayFlashSwap() (gas: 234035) +UniswapFlashSwapExactOutTest:testRevertsIfCalledDirectly() (gas: 104305) +UniswapFlashSwapExactOutTest:testUniswapFlashSwapExactOutLeverageComet() (gas: 311178) +isValidSignatureTest:testIsValidSignatureForEOAOwner() (gas: 13018) +isValidSignatureTest:testReturnsMagicValueForValidSignature() (gas: 8617) +isValidSignatureTest:testRevertsForEmptyContract() (gas: 10853) +isValidSignatureTest:testRevertsForInvalidSignature() (gas: 16177) +isValidSignatureTest:testRevertsForMessageWithoutDomainTypehash() (gas: 13534) +isValidSignatureTest:testRevertsForPermit2SignatureReuse() (gas: 64681) +isValidSignatureTest:testRevertsForPermit2SignatureWithoutDomainTypehash() (gas: 30589) +isValidSignatureTest:testRevertsForWrongSigner() (gas: 13580) +isValidSignatureTest:testRevertsIfSignatureExceeds65Bytes() (gas: 5405) +isValidSignatureTest:testRevertsIfSignerContractDoesNotReturnMagic() (gas: 8793) +isValidSignatureTest:testRevertsIfSignerContractReverts() (gas: 8638) +isValidSignatureTest:testRevertsInvalidS() (gas: 12791) \ No newline at end of file diff --git a/.github/workflows/gas-snapshot.yml b/.github/workflows/gas-snapshot.yml index 301ac0e6..9e573a33 100644 --- a/.github/workflows/gas-snapshot.yml +++ b/.github/workflows/gas-snapshot.yml @@ -5,7 +5,7 @@ on: pull_request: env: - FOUNDRY_PROFILE: ci + FOUNDRY_PROFILE: ir jobs: snapshot-gas: @@ -29,7 +29,7 @@ jobs: run: | set -euo pipefail # grep -E '^test' -- skip over test results, just get diffs - forge snapshot --via-ir --diff \ + forge snapshot --diff \ | grep -E '^test' \ | tee .gas-snapshot.new env: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3afc3cf6..88fc3137 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ on: pull_request: env: - FOUNDRY_PROFILE: ci + FOUNDRY_PROFILE: ir jobs: check: @@ -30,7 +30,7 @@ jobs: - name: Run Forge build run: | forge --version - forge build --via-ir --sizes + forge build --sizes id: build - name: Run Forge Format diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60034b07..df4e3691 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: pull_request: env: - FOUNDRY_PROFILE: ci + FOUNDRY_PROFILE: ir jobs: check: @@ -30,12 +30,12 @@ jobs: - name: Run Forge build run: | forge --version - forge build --via-ir --sizes + forge build --sizes id: build - name: Run Forge tests run: | - forge test --via-ir + forge test id: test env: MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} diff --git a/foundry.toml b/foundry.toml index 9cd9f8aa..fea9f1f5 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,10 +1,13 @@ [profile.default] solc = "0.8.27" evm_version = "cancun" - libs = [ "./lib" ] +bytecode_hash = "none" +cbor_metadata = false -# output intermediate representation [profile.ir] -extra_output = ["ir"] -extra_output_files = ["ir"] +via_ir = true +optimizer = true +optimizer_runs = 100000000 +extra_output = [ "ir" ] +extra_output_files = [ "ir" ] diff --git a/script/deploy-code-jar.sh b/script/deploy-code-jar.sh index 438bc938..41a31df0 100755 --- a/script/deploy-code-jar.sh +++ b/script/deploy-code-jar.sh @@ -20,7 +20,7 @@ else etherscan_args="" fi -forge script --via-ir \ +FOUNDRY_PROFILE=ir forge script \ $rpc_args \ $wallet_args \ $etherscan_args \ diff --git a/script/deploy-quark.sh b/script/deploy-quark.sh index b1b6e321..c3db1795 100755 --- a/script/deploy-quark.sh +++ b/script/deploy-quark.sh @@ -20,7 +20,7 @@ else etherscan_args="" fi -forge script --via-ir \ +FOUNDRY_PROFILE=ir forge script \ $rpc_args \ $wallet_args \ $etherscan_args \ diff --git a/script/prepare-release.sh b/script/prepare-release.sh index 06c1e737..6be07efa 100755 --- a/script/prepare-release.sh +++ b/script/prepare-release.sh @@ -14,7 +14,7 @@ artifact_name="quark-out.${release_name}.zip" artifact_note="Compiled ABI" printf 'building full project...\n' -forge build --via-ir +FOUNDRY_PROFILE=ir forge build printf 'preparing release archive "%s"...\n' ${release_name} zip --recurse-paths "${artifact_name}" out/* diff --git a/script/update-snapshot.sh b/script/update-snapshot.sh index 3c46b51c..795d273f 100755 --- a/script/update-snapshot.sh +++ b/script/update-snapshot.sh @@ -1,3 +1,3 @@ #!/bin/bash -forge snapshot --via-ir \ No newline at end of file +FOUNDRY_PROFILE=ir forge snapshot \ No newline at end of file diff --git a/src/codejar/foundry.toml b/src/codejar/foundry.toml index 04443a55..073f7e19 100644 --- a/src/codejar/foundry.toml +++ b/src/codejar/foundry.toml @@ -1,9 +1,14 @@ [profile.default] solc = "0.8.27" evm_version = "cancun" - libs = [ "../../lib" ] - src = "src" out = "out" test = "../../test/codejar" + +[profile.ir] +via_ir = true +optimizer = true +optimizer_runs = 100000000 +extra_output = [ "ir" ] +extra_output_files = [ "ir" ] \ No newline at end of file diff --git a/src/quark-core-scripts/foundry.toml b/src/quark-core-scripts/foundry.toml index 5d8adf3f..c27ca58d 100644 --- a/src/quark-core-scripts/foundry.toml +++ b/src/quark-core-scripts/foundry.toml @@ -1,9 +1,16 @@ [profile.default] solc = "0.8.27" evm_version = "cancun" - libs = [ "../../lib" ] - src = "src" out = "out" test = "../../test/quark-core-scripts/" +bytecode_hash = "none" +cbor_metadata = false + +[profile.ir] +via_ir = true +optimizer = true +optimizer_runs = 100000000 +extra_output = [ "ir" ] +extra_output_files = [ "ir" ] \ No newline at end of file diff --git a/src/quark-core/foundry.toml b/src/quark-core/foundry.toml index 09a39c63..ae1242f3 100644 --- a/src/quark-core/foundry.toml +++ b/src/quark-core/foundry.toml @@ -1,9 +1,16 @@ [profile.default] solc = "0.8.27" evm_version = "cancun" - libs = [ "../../lib" ] - src = "src" out = "out" test = "../../test/quark-core" +bytecode_hash = "none" +cbor_metadata = false + +[profile.ir] +via_ir = true +optimizer = true +optimizer_runs = 100000000 +extra_output = [ "ir" ] +extra_output_files = [ "ir" ] \ No newline at end of file diff --git a/src/quark-factory/foundry.toml b/src/quark-factory/foundry.toml index a9abd330..f8a61332 100644 --- a/src/quark-factory/foundry.toml +++ b/src/quark-factory/foundry.toml @@ -1,9 +1,16 @@ [profile.default] solc = "0.8.27" evm_version = "cancun" - libs = [ "../../lib" ] - src = "src" out = "out" test = "../../test/quark-factory/" +bytecode_hash = "none" +cbor_metadata = false + +[profile.ir] +via_ir = true +optimizer = true +optimizer_runs = 100000000 +extra_output = [ "ir" ] +extra_output_files = [ "ir" ] \ No newline at end of file diff --git a/src/quark-proxy/foundry.toml b/src/quark-proxy/foundry.toml index 15c1aff9..667a0832 100644 --- a/src/quark-proxy/foundry.toml +++ b/src/quark-proxy/foundry.toml @@ -1,19 +1,17 @@ [profile.default] solc = "0.8.27" evm_version = "cancun" - libs = [ "../../lib" ] - src = "src" out = "out" test = "../../test/quark-proxy" - -# optimizer config -optimizer = true -optimizer_runs = 1 +cbor_metadata = false bytecode_hash = "none" [profile.ir] via_ir = true +optimizer = true +# We optimize for deployment cost over runtime gas efficiency +optimizer_runs = 1 extra_output = [ "ir" ] extra_output_files = [ "ir" ]