Skip to content

Commit

Permalink
bump foundry version (#10889)
Browse files Browse the repository at this point in the history
* bump foundry version

* bump forge-std 1.6.1 -> 1.7.1

* fix snapshot and rm failfast CI

* turn off failing tests with TODO

* bump foundry version

* bump foundry version (#10896)

* run prettier

* fix wrong prettier

---------

Co-authored-by: Makram <[email protected]>
  • Loading branch information
RensR and makramkd authored Oct 10, 2023
1 parent 743ee49 commit 2ce9e60
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 53 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
tests:
strategy:
fail-fast: false
matrix:
product: [vrf, automation, llo-feeds, functions, shared]
needs: [changes]
Expand All @@ -54,7 +55,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
with:
# Has to match the `make foundry` version.
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
version: nightly-e0722a10b45859892ec3b998df958a9edc77c202

- name: Run Forge build
run: |
Expand Down
2 changes: 1 addition & 1 deletion contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mockery: $(mockery) ## Install mockery.

.PHONY: foundry
foundry: ## Install foundry.
foundryup --version nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
foundryup --version nightly-e0722a10b45859892ec3b998df958a9edc77c202

.PHONY: foundry-refresh
foundry-refresh: foundry
Expand Down
2 changes: 1 addition & 1 deletion contracts/foundry-lib/forge-std
Submodule forge-std updated 4 files
+1 −1 package.json
+4 −0 src/StdJson.sol
+452 −286 src/Vm.sol
+15 −0 test/Vm.t.sol
12 changes: 6 additions & 6 deletions contracts/gas-snapshots/functions.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotAll
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotSubscriptionOwner() (gas: 89316)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPaused() (gas: 20191)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 193222)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 113352)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 124604)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessRecieveDeposit() (gas: 310090)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 114636)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 125891)
FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessRecieveDeposit() (gas: 311988)
FunctionsSubscriptions_Constructor:test_Constructor_Success() (gas: 7654)
FunctionsSubscriptions_CreateSubscriptionWithConsumer:test_CreateSubscriptionWithConsumer_RevertIfNotAllowedSender() (gas: 28637)
FunctionsSubscriptions_CreateSubscriptionWithConsumer:test_CreateSubscriptionWithConsumer_RevertIfPaused() (gas: 17948)
Expand All @@ -106,8 +106,8 @@ FunctionsSubscriptions_GetConsumer:test_GetConsumer_Success() (gas: 16225)
FunctionsSubscriptions_GetFlags:test_GetFlags_Success() (gas: 40858)
FunctionsSubscriptions_GetSubscription:test_GetSubscription_Success() (gas: 30959)
FunctionsSubscriptions_GetSubscriptionCount:test_GetSubscriptionCount_Success() (gas: 12967)
FunctionsSubscriptions_GetSubscriptionsInRange:test_GetSubscriptionsInRange_RevertIfEndIsAfterLastSubscription() (gas: 14949)
FunctionsSubscriptions_GetSubscriptionsInRange:test_GetSubscriptionsInRange_RevertIfStartIsAfterEnd() (gas: 11863)
FunctionsSubscriptions_GetSubscriptionsInRange:test_GetSubscriptionsInRange_RevertIfEndIsAfterLastSubscription() (gas: 16523)
FunctionsSubscriptions_GetSubscriptionsInRange:test_GetSubscriptionsInRange_RevertIfStartIsAfterEnd() (gas: 13436)
FunctionsSubscriptions_GetSubscriptionsInRange:test_GetSubscriptionsInRange_Success() (gas: 59568)
FunctionsSubscriptions_GetTotalBalance:test_GetTotalBalance_Success() (gas: 15032)
FunctionsSubscriptions_OnTokenTransfer:test_OnTokenTransfer_RevertIfCallerIsNoCalldata() (gas: 27594)
Expand All @@ -124,7 +124,7 @@ FunctionsSubscriptions_OracleWithdraw:test_OracleWithdraw_SuccessSetsBalanceToZe
FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_RevertIfNoSubscription() (gas: 12818)
FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_RevertIfNotOwner() (gas: 15549)
FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Success() (gas: 54867)
FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessDeletesSubscription() (gas: 48362)
FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessDeletesSubscription() (gas: 49624)
FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessSubOwnerRefunded() (gas: 50896)
FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 163867)
FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfAmountMoreThanBalance() (gas: 17924)
Expand Down
32 changes: 16 additions & 16 deletions contracts/gas-snapshots/llo-feeds.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FeeManagerProcessFeeTest:test_discountIsNoLongerAppliedAfterRemoving() (gas: 459
FeeManagerProcessFeeTest:test_discountIsNotAppliedForInvalidTokenAddress() (gas: 17546)
FeeManagerProcessFeeTest:test_discountIsNotAppliedToOtherFeeds() (gas: 54241)
FeeManagerProcessFeeTest:test_discountIsReturnedForLink() (gas: 49252)
FeeManagerProcessFeeTest:test_emptyQuoteRevertsWithError() (gas: 11286)
FeeManagerProcessFeeTest:test_emptyQuoteRevertsWithError() (gas: 12152)
FeeManagerProcessFeeTest:test_eventIsEmittedAfterSurchargeIsSet() (gas: 41348)
FeeManagerProcessFeeTest:test_eventIsEmittedIfNotEnoughLink() (gas: 172711)
FeeManagerProcessFeeTest:test_eventIsEmittedUponWithdraw() (gas: 68984)
Expand Down Expand Up @@ -87,7 +87,7 @@ FeeManagerProcessFeeTest:test_surchargeIsAppliedForNativeFeeWithDiscount() (gas:
FeeManagerProcessFeeTest:test_surchargeIsNoLongerAppliedAfterRemoving() (gas: 46503)
FeeManagerProcessFeeTest:test_surchargeIsNotAppliedForLinkFee() (gas: 49585)
FeeManagerProcessFeeTest:test_surchargeIsNotAppliedWith100PercentDiscount() (gas: 77890)
FeeManagerProcessFeeTest:test_testRevertIfReportHasExpired() (gas: 14042)
FeeManagerProcessFeeTest:test_testRevertIfReportHasExpired() (gas: 14908)
RewardManagerClaimTest:test_claimAllRecipients() (gas: 275763)
RewardManagerClaimTest:test_claimMultipleRecipients() (gas: 153306)
RewardManagerClaimTest:test_claimRewardsWithDuplicatePoolIdsDoesNotPayoutTwice() (gas: 328345)
Expand Down Expand Up @@ -123,7 +123,7 @@ RewardManagerRecipientClaimMultiplePoolsTest:test_claimSingleUniqueRecipient() (
RewardManagerRecipientClaimMultiplePoolsTest:test_claimUnevenAmountRoundsDown() (gas: 576289)
RewardManagerRecipientClaimMultiplePoolsTest:test_claimUnregisteredRecipient() (gas: 63555)
RewardManagerRecipientClaimMultiplePoolsTest:test_getAvailableRewardsCursorAndTotalPoolsEqual() (gas: 10202)
RewardManagerRecipientClaimMultiplePoolsTest:test_getAvailableRewardsCursorCannotBeGreaterThanTotalPools() (gas: 11107)
RewardManagerRecipientClaimMultiplePoolsTest:test_getAvailableRewardsCursorCannotBeGreaterThanTotalPools() (gas: 12680)
RewardManagerRecipientClaimMultiplePoolsTest:test_getAvailableRewardsCursorSingleResult() (gas: 19606)
RewardManagerRecipientClaimMultiplePoolsTest:test_getRewardsAvailableToRecipientInBothPools() (gas: 29052)
RewardManagerRecipientClaimMultiplePoolsTest:test_getRewardsAvailableToRecipientInBothPoolsWhereAlreadyClaimed() (gas: 147218)
Expand Down Expand Up @@ -181,11 +181,11 @@ VerifierBulkVerifyBillingReport:test_verifyWithBulkNativeUnwrappedReturnsChange(
VerifierConstructorTest:test_revertsIfInitializedWithEmptyVerifierProxy() (gas: 59967)
VerifierConstructorTest:test_setsTheCorrectProperties() (gas: 1815769)
VerifierDeactivateFeedWithVerifyTest:test_currentReportAllowsVerification() (gas: 192062)
VerifierDeactivateFeedWithVerifyTest:test_currentReportFailsVerification() (gas: 111727)
VerifierDeactivateFeedWithVerifyTest:test_currentReportFailsVerification() (gas: 113377)
VerifierDeactivateFeedWithVerifyTest:test_previousReportAllowsVerification() (gas: 99613)
VerifierDeactivateFeedWithVerifyTest:test_previousReportFailsVerification() (gas: 68305)
VerifierDeactivateFeedWithVerifyTest:test_previousReportFailsVerification() (gas: 69932)
VerifierProxyAccessControlledVerificationTest:test_proxiesToTheVerifierIfHasAccess() (gas: 205796)
VerifierProxyAccessControlledVerificationTest:test_revertsIfNoAccess() (gas: 110688)
VerifierProxyAccessControlledVerificationTest:test_revertsIfNoAccess() (gas: 112334)
VerifierProxyConstructorTest:test_correctlySetsTheCorrectAccessControllerInterface() (gas: 1482522)
VerifierProxyConstructorTest:test_correctlySetsTheOwner() (gas: 1462646)
VerifierProxyConstructorTest:test_correctlySetsVersion() (gas: 6873)
Expand All @@ -207,7 +207,7 @@ VerifierProxyUnsetVerifierTest:test_revertsIfNotAdmin() (gas: 14965)
VerifierProxyUnsetVerifierWithPreviouslySetVerifierTest:test_correctlyUnsetsVerifier() (gas: 12720)
VerifierProxyUnsetVerifierWithPreviouslySetVerifierTest:test_emitsAnEventAfterUnsettingVerifier() (gas: 17965)
VerifierProxyVerifyTest:test_proxiesToTheCorrectVerifier() (gas: 201609)
VerifierProxyVerifyTest:test_revertsIfNoVerifierConfigured() (gas: 115615)
VerifierProxyVerifyTest:test_revertsIfNoVerifierConfigured() (gas: 117256)
VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlySetsConfigWhenDigestsAreRemoved() (gas: 538896)
VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlyUpdatesDigestsOnMultipleVerifiersInTheProxy() (gas: 964726)
VerifierSetConfigFromSourceMultipleDigestsTest:test_correctlyUpdatesTheDigestInTheProxy() (gas: 520480)
Expand All @@ -230,17 +230,17 @@ VerifierTestBillingReport:test_verifyWithNativeUnwrapped() (gas: 317892)
VerifierTestBillingReport:test_verifyWithNativeUnwrappedReturnsChange() (gas: 324958)
VerifierVerifyMultipleConfigDigestTest:test_canVerifyNewerReportsWithNewerConfigs() (gas: 131228)
VerifierVerifyMultipleConfigDigestTest:test_canVerifyOlderReportsWithOlderConfigs() (gas: 187132)
VerifierVerifyMultipleConfigDigestTest:test_revertsIfAReportIsVerifiedWithAnExistingButIncorrectDigest() (gas: 86566)
VerifierVerifyMultipleConfigDigestTest:test_revertsIfVerifyingWithAnUnsetDigest() (gas: 126411)
VerifierVerifyMultipleConfigDigestTest:test_revertsIfAReportIsVerifiedWithAnExistingButIncorrectDigest() (gas: 88205)
VerifierVerifyMultipleConfigDigestTest:test_revertsIfVerifyingWithAnUnsetDigest() (gas: 128062)
VerifierVerifySingleConfigDigestTest:test_emitsAnEventIfReportVerified() (gas: 186945)
VerifierVerifySingleConfigDigestTest:test_returnsThePriceAndBlockNumIfReportVerified() (gas: 187114)
VerifierVerifySingleConfigDigestTest:test_revertsIfConfigDigestNotSet() (gas: 114479)
VerifierVerifySingleConfigDigestTest:test_revertsIfDuplicateSignersHaveSigned() (gas: 180665)
VerifierVerifySingleConfigDigestTest:test_revertsIfMismatchedSignatureLength() (gas: 51479)
VerifierVerifySingleConfigDigestTest:test_revertsIfReportHasUnconfiguredFeedID() (gas: 102318)
VerifierVerifySingleConfigDigestTest:test_revertsIfVerifiedByNonProxy() (gas: 99348)
VerifierVerifySingleConfigDigestTest:test_revertsIfVerifiedWithIncorrectAddresses() (gas: 182416)
VerifierVerifySingleConfigDigestTest:test_revertsIfWrongNumberOfSigners() (gas: 108382)
VerifierVerifySingleConfigDigestTest:test_revertsIfConfigDigestNotSet() (gas: 116130)
VerifierVerifySingleConfigDigestTest:test_revertsIfDuplicateSignersHaveSigned() (gas: 182315)
VerifierVerifySingleConfigDigestTest:test_revertsIfMismatchedSignatureLength() (gas: 53037)
VerifierVerifySingleConfigDigestTest:test_revertsIfReportHasUnconfiguredFeedID() (gas: 103976)
VerifierVerifySingleConfigDigestTest:test_revertsIfVerifiedByNonProxy() (gas: 100992)
VerifierVerifySingleConfigDigestTest:test_revertsIfVerifiedWithIncorrectAddresses() (gas: 184066)
VerifierVerifySingleConfigDigestTest:test_revertsIfWrongNumberOfSigners() (gas: 110031)
VerifierVerifySingleConfigDigestTest:test_setsTheCorrectEpoch() (gas: 194270)
Verifier_accessControlledVerify:testVerifyWithAccessControl_gas() (gas: 212066)
Verifier_bulkVerifyWithFee:testBulkVerifyProxyWithLinkFeeSuccess_gas() (gas: 519368)
Expand Down
56 changes: 28 additions & 28 deletions contracts/test/v0.8/foundry/vrf/VRFV2Plus.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,15 @@ contract VRFV2Plus is BaseTest {
// Store the previous block's blockhash, and assert that it is as expected.
vm.roll(requestBlock + 1);
s_bhs.store(requestBlock);
assertEq(hex"c65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8", s_bhs.getBlockhash(requestBlock));
assertEq(hex"000000000000000000000000000000000000000000000000000000000000000a", s_bhs.getBlockhash(requestBlock));

// Fulfill the request.
// Proof generated via the generate-proof-v2-plus script command. Example usage:
/*
go run . generate-proof-v2-plus \
-key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \
-pre-seed 53391429126065232382402681707515137895470547057819816488254124798726362946635 \
-block-hash 0xc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8 \
-pre-seed 93724884573574303181157854277074121673523280784530506403108144933983063023487 \
-block-hash 0x000000000000000000000000000000000000000000000000000000000000000a \
-block-num 10 \
-sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2 \
-native-payment true
Expand All @@ -301,22 +301,22 @@ contract VRFV2Plus is BaseTest {
62070622898698443831883535403436258712770888294397026493185421712108624767191
],
gamma: [
2973102176083872659982988645522968133664529102555885971868619302367987919116,
43610558806647181042154132372309425100765955827430056035281841579494767100593
51111463251706978184511913295560024261167135799300172382907308330135472647507,
41885656274025752055847945432737871864088659248922821023734315208027501951872
],
c: 44558436621153210954487996771157467729629491520915192177070584116261579650304,
s: 18447217702001910909971999949841419857536434117467121546901211519652998560328,
seed: 53391429126065232382402681707515137895470547057819816488254124798726362946635,
uWitness: 0x61e70839187C12Fe136bdcC78D1D3765BecA245d,
c: 96917856581077810363012153828220232197567408835708926581335248000925197916153,
s: 103298896676233752268329042222773891728807677368628421408380318882272184455566,
seed: 93724884573574303181157854277074121673523280784530506403108144933983063023487,
uWitness: 0xFCaA10875C6692f6CcC86c64300eb0b52f2D4323,
cGammaWitness: [
57868024672571504735938309170346165090467827794150592801232968679608710558443,
19249635816589941728350586356475545703589085434839461964712223344491075318152
61463607927970680172418313129927007099021056249775757132623753443657677198526,
48686021866486086188742596461341782400160109177829661164208082534005682984658
],
sHashWitness: [
61151023867440095994162103308586528914977848168432699421313437043942463394142,
107161674609768447269383119603000260750848712436031813376573304048979100187696
91508089836242281395929619352465003226819385335975246221498243754781593857533,
63571625936444669399167157725633389238098818902162172059681813608664564703308
],
zInv: 92231836131549905872346812799402691650433126386650679876913933650318463342041
zInv: 97568175302326019383632009699686265453584842953005404815285123863099260038246
});
VRFCoordinatorV2_5.RequestCommitment memory rc = VRFCoordinatorV2_5.RequestCommitment({
blockNum: requestBlock,
Expand Down Expand Up @@ -399,15 +399,15 @@ contract VRFV2Plus is BaseTest {
// Store the previous block's blockhash, and assert that it is as expected.
vm.roll(requestBlock + 1);
s_bhs.store(requestBlock);
assertEq(hex"ce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec", s_bhs.getBlockhash(requestBlock));
assertEq(hex"0000000000000000000000000000000000000000000000000000000000000014", s_bhs.getBlockhash(requestBlock));

// Fulfill the request.
// Proof generated via the generate-proof-v2-plus script command. Example usage:
/*
go run . generate-proof-v2-plus \
-key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \
-pre-seed 14817911724325909152780695848148728017190840227899344848185245004944693487904 \
-block-hash 0xce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec \
-pre-seed 108233140904510496268355288815996296196427471042093167619305836589216327096601 \
-block-hash 0x0000000000000000000000000000000000000000000000000000000000000014 \
-block-num 20 \
-sender 0x90A8820424CC8a819d14cBdE54D12fD3fbFa9bb2
*/
Expand All @@ -417,22 +417,22 @@ contract VRFV2Plus is BaseTest {
62070622898698443831883535403436258712770888294397026493185421712108624767191
],
gamma: [
33866404953216897461413961842321788789902210776565180957857448351149268461878,
115311460432520855364215812517921508651759645277579047898967111537639679255245
49785247270467418393187938018746488660500261614113251546613288843777654841004,
8320717868018488740308781441198484312662094766876176838868269181386589318272
],
c: 32561838617228634441320154326890637858849550728945663611942735469609183032389,
s: 55806041637816588920133401262818662941786708593795051215322306020699218819370,
seed: 14817911724325909152780695848148728017190840227899344848185245004944693487904,
uWitness: 0x917554f18dB75eac206Ae5366B80c0b6A87b5996,
c: 41596204381278553342984662603150353549780558761307588910860350083645227536604,
s: 81592778991188138734863787790226463602813498664606420860910885269124681994753,
seed: 108233140904510496268355288815996296196427471042093167619305836589216327096601,
uWitness: 0x56920892EE71E624d369dCc8dc63B6878C85Ca70,
cGammaWitness: [
84076069514674055711740813040098459867759972960517070154541804330775196519927,
23456142794899412334950030002327578074149212885334118042147040122102091306080
28250667431035633903490940933503696927659499415200427260709034207157951953043,
105660182690338773283351292037478192732977803900032569393220726139772041021018
],
sHashWitness: [
67919054534004130885903575144858988177160334233773664996450084407340736891592,
82934864721844704662104532515068228502043057799129930869203380251475000254135
18420263847278540234821121001488166570853056146131705862117248292063859054211,
15740432967529684573970722302302642068194042971767150190061244675457227502736
],
zInv: 37397948970756055003892765560695914630264479979131589134478580629419519112029
zInv: 100579074451139970455673776933943662313989441807178260211316504761358492254052
});
VRFCoordinatorV2_5.RequestCommitment memory rc = VRFCoordinatorV2_5.RequestCommitment({
blockNum: requestBlock,
Expand Down

0 comments on commit 2ce9e60

Please sign in to comment.