Skip to content

Commit

Permalink
Update reentrancy lib on facets using it (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppecrj authored Dec 20, 2024
1 parent 062a38c commit 75837a7
Show file tree
Hide file tree
Showing 150 changed files with 304 additions and 358 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"address": "0xED9926A11F1B0557Bf3536BA73356Ac25816CbE7"
"address": "0x58C908De637F38DD9Df28f4EdAebD8A09b2cC2F2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"address": "0x0CF4a62948a6d48f8864D4c2DF47F108e23162A1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"address": "0x686ca3d45917D07FA8cb0b7C57eb707a080bE2f8"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"address": "0xD10276346228Db6174D2c0Ab082388C55c599B90"
"address": "0x64569eBC86787e73242394599B0B21D7EB1adAE1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"address": "0xd3477440E251A583ba178ab049980f821AE9f357"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"address": "0x182CbC4aC7792D670b455d27F89DeA8f3016ab41"
"address": "0xDB38ea4d67bE5Dfc5750B169b538409146987011"
}
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@openzeppelin/contracts": "^5.1.0",
"@openzeppelin/contracts-upgradeable": "^5.1.0",
"@prb/math": "^4.1.0",
"@river-build/diamond": "github:river-build/diamond#8341c4888cf74329663abe4d34b96a07c21c7677",
"@river-build/diamond": "github:river-build/diamond#5b9f60d7ff0d4ff99c560d95c15a5e7e8caf922a",
"account-abstraction": "github:eth-infinitism/account-abstraction",
"solady": "^0.0.267"
},
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/factory/facets/architect/Architect.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {ISpaceProxyInitializer} from "contracts/src/spaces/facets/proxy/ISpacePr
// contracts
import {ArchitectBase} from "./ArchitectBase.sol";
import {OwnableBase} from "@river-build/diamond/src/facets/ownable/OwnableBase.sol";
import {ReentrancyGuard} from "@river-build/diamond/src/facets/reentrancy/ReentrancyGuard.sol";
import {ReentrancyGuard} from "solady/utils/ReentrancyGuard.sol";
import {PausableBase} from "@river-build/diamond/src/facets/pausable/PausableBase.sol";
import {Facet} from "@river-build/diamond/src/facets/Facet.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/src/factory/facets/create/CreateSpace.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {ICreateSpace} from "contracts/src/factory/facets/create/ICreateSpace.sol
import {Facet} from "@river-build/diamond/src/facets/Facet.sol";
import {ArchitectBase} from "contracts/src/factory/facets/architect/ArchitectBase.sol";
import {PausableBase} from "@river-build/diamond/src/facets/pausable/PausableBase.sol";
import {ReentrancyGuard} from "@river-build/diamond/src/facets/reentrancy/ReentrancyGuard.sol";
import {ReentrancyGuard} from "solady/utils/ReentrancyGuard.sol";

contract CreateSpaceFacet is
ICreateSpace,
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/spaces/facets/gated/EntitlementGated.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {IEntitlementChecker} from "contracts/src/base/registry/facets/checker/IE
// contracts
import {EntitlementGatedBase} from "./EntitlementGatedBase.sol";
import {Facet} from "@river-build/diamond/src/facets/Facet.sol";
import {ReentrancyGuard} from "@river-build/diamond/src/facets/reentrancy/ReentrancyGuard.sol";
import {ReentrancyGuard} from "solady/utils/ReentrancyGuard.sol";

contract EntitlementGated is
IEntitlementGated,
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/spaces/facets/membership/MembershipBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {IPricingModules} from "contracts/src/factory/facets/architect/pricing/IP
// libraries
import {CurrencyTransfer} from "contracts/src/utils/libraries/CurrencyTransfer.sol";
import {MembershipStorage} from "./MembershipStorage.sol";
import {FixedPointMathLib} from "solady/utils/FixedPointMathLib.sol";

// contracts
import {BasisPoints} from "contracts/src/utils/libraries/BasisPoints.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/src/spaces/facets/membership/MembershipFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IMembershipPricing} from "./pricing/IMembershipPricing.sol";
import {CurrencyTransfer} from "contracts/src/utils/libraries/CurrencyTransfer.sol";

// contracts
import {ReentrancyGuard} from "@river-build/diamond/src/facets/reentrancy/ReentrancyGuard.sol";
import {ReentrancyGuard} from "solady/utils/ReentrancyGuard.sol";
import {MembershipJoin} from "./join/MembershipJoin.sol";
import {Facet} from "@river-build/diamond/src/facets/Facet.sol";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {Permissions} from "contracts/src/spaces/facets/Permissions.sol";
import {CurrencyTransfer} from "contracts/src/utils/libraries/CurrencyTransfer.sol";
import {BasisPoints} from "contracts/src/utils/libraries/BasisPoints.sol";
import {FixedPointMathLib} from "solady/utils/FixedPointMathLib.sol";
import {MembershipStorage} from "../MembershipStorage.sol";

// contracts
import {MembershipBase} from "contracts/src/spaces/facets/membership/MembershipBase.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/spaces/facets/prepay/PrepayFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {CurrencyTransfer} from "contracts/src/utils/libraries/CurrencyTransfer.s

// contracts
import {PrepayBase} from "./PrepayBase.sol";
import {ReentrancyGuard} from "@river-build/diamond/src/facets/reentrancy/ReentrancyGuard.sol";
import {ReentrancyGuard} from "solady/utils/ReentrancyGuard.sol";
import {Entitled} from "contracts/src/spaces/facets/Entitled.sol";
import {Facet} from "@river-build/diamond/src/facets/Facet.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/mocks/legacy/MockLegacyArchitect.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {ILegacyArchitect} from "./IMockLegacyArchitect.sol";

// contracts
import {LegacyArchitectBase} from "./MockLegacyArchitectBase.sol";
import {ReentrancyGuard} from "@river-build/diamond/src/facets/reentrancy/ReentrancyGuard.sol";
import {ReentrancyGuard} from "solady/utils/ReentrancyGuard.sol";
import {PausableBase} from "@river-build/diamond/src/facets/pausable/PausableBase.sol";
import {Facet} from "@river-build/diamond/src/facets/Facet.sol";

Expand Down
4 changes: 2 additions & 2 deletions core/contracts/base/deploy/mock_entitlement_gated.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/generated/dev/abis/Architect.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
},
{
"type": "error",
"name": "ReentrancyGuard__ReentrantCall",
"name": "Reentrancy",
"inputs": []
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/Architect.abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ export default [
},
{
"type": "error",
"name": "ReentrancyGuard__ReentrantCall",
"name": "Reentrancy",
"inputs": []
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/Architect.json

Large diffs are not rendered by default.

69 changes: 19 additions & 50 deletions packages/generated/dev/abis/Architect.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
{
"inputs": [],
"type": "error",
"name": "ReentrancyGuard__ReentrantCall"
"name": "Reentrancy"
},
{
"inputs": [],
Expand Down Expand Up @@ -604,6 +604,7 @@
"settings": {
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@prb/=node_modules/@prb/",
"@prb/math/=node_modules/@prb/math/src/",
"@prb/test/=node_modules/@prb/test/src/",
"@river-build/diamond/=node_modules/@river-build/diamond/",
Expand Down Expand Up @@ -669,10 +670,10 @@
"license": "MIT"
},
"contracts/src/factory/facets/architect/Architect.sol": {
"keccak256": "0x77f2957691265169ea55afa8b5457e1d504192cda14240b70c75588b20d1a240",
"keccak256": "0xc4700b4645f4ed25a0ec537f82aabf2e8d53791af9245f87ae48943f61ec1f92",
"urls": [
"bzz-raw://bb8ee77454b86cc877cb09ebc5cceb5446213249769d92c6fe74f5adcdfbbe79",
"dweb:/ipfs/QmXnV5tXMoHcpnRNJFXcRGFycpZ3aJCKK2qkNApU4thzQN"
"bzz-raw://b89ecb4a9008f9486b2cf5668ad8690902d006851d30c540c43bbe05d3dfa122",
"dweb:/ipfs/QmR9bUyLoF5rACLAcyZiXzwT5ibxoxgyi79YBNLd9m66wo"
],
"license": "MIT"
},
Expand Down Expand Up @@ -837,10 +838,10 @@
"license": "MIT"
},
"contracts/src/spaces/facets/membership/MembershipBase.sol": {
"keccak256": "0x8f9aef80079d987d86c471b1c70d18efe7b54988b71270a3680dc29e50c92972",
"keccak256": "0x7de2e6eb87601c5cf86f38ca75f53315f219752bca3f8893c03be06b114cf3b8",
"urls": [
"bzz-raw://bcf8c2521e2949652e0d2c8c30826795987818f3b53ee5e066b2ebeae80a8619",
"dweb:/ipfs/QmR5PReJawjcGitiScZr6LuDQ4py8wjeu43XDXYx1yyVjj"
"bzz-raw://63346e971ba0dd2bb309d381284a0249dd7a5ca500ad9cb07685478dd148eaf2",
"dweb:/ipfs/QmWMLZuopNrxzmSyeWcMQCGf74Btqs8dAGTt2AQarcpHoC"
],
"license": "MIT"
},
Expand Down Expand Up @@ -1133,10 +1134,10 @@
"license": "MIT"
},
"node_modules/@river-build/diamond/src/facets/ownable/token/ITokenOwnable.sol": {
"keccak256": "0x1aa5a7e61796399bfab5d3a4b23fad8c393caf472d965b6dc8c8aa0efb184417",
"keccak256": "0x125ffc776682deecf6bbf36f4b33b762968a4e6ad182dd5a896fb92fd103b397",
"urls": [
"bzz-raw://312e57d67c076b8c9c4813d210920dc5f678d0efc043f5eb4103828696af0bc7",
"dweb:/ipfs/QmS7tY5kWPBPCxZCYQv4MfABJUccMDmuZT9Mnd82WSFCGx"
"bzz-raw://bdb1d0973416722e1f7772f9f0adb2d76a262c6cb667b5c3907076f4c9b3bd37",
"dweb:/ipfs/Qme3Xvaq4fWexPd6TAjWpqfmiQ1KCedKGXwE9nxrcv2Cw3"
],
"license": "MIT"
},
Expand Down Expand Up @@ -1180,30 +1181,6 @@
],
"license": "MIT"
},
"node_modules/@river-build/diamond/src/facets/reentrancy/IReentrancyGuard.sol": {
"keccak256": "0x89ad30ac5476efd023189fca20b13214fe5541ea5fff11760e00f229c62c896e",
"urls": [
"bzz-raw://fc04fb0c48333cb0f4b84b01e50498d60510d52495c3772f0bf632773ec47a7d",
"dweb:/ipfs/QmQUuYriat7eRRsPUHTeD2CDEwHzYxqW6qix7xf44kWByo"
],
"license": "MIT"
},
"node_modules/@river-build/diamond/src/facets/reentrancy/ReentrancyGuard.sol": {
"keccak256": "0xb481ee6684d1589254563cb5c318b1eb75f6f15f96baecbd5f5e42b72b7a5003",
"urls": [
"bzz-raw://70e1bafcd0779c6241ee7716ae2058dd6f7d5a75bb211f5bfcb9aefa434228f8",
"dweb:/ipfs/QmSbsdGjL1be4VBjgWrk5CodWGvszXZt5HX32PxhvXTZ5Y"
],
"license": "MIT"
},
"node_modules/@river-build/diamond/src/facets/reentrancy/ReentrancyGuardStorage.sol": {
"keccak256": "0xe4a08e5712446357756a6da7b65ae80845732dfebac180bd478caaf64dfc790e",
"urls": [
"bzz-raw://09f5691ae9aedbe094cc83a0e8a4272c4d6dd5f57e69fec5870b148f2d94395e",
"dweb:/ipfs/QmTLHQWuRp1L45oRV8oWWbk4Y4MMNYW1Rp9WUJ86gzVVRv"
],
"license": "MIT"
},
"node_modules/@river-build/diamond/src/proxy/IProxy.sol": {
"keccak256": "0x94506109e5e47fafba65c94f2d74d0c7860e5911fe90fbe3b49817afda3b2145",
"urls": [
Expand Down Expand Up @@ -1252,14 +1229,6 @@
],
"license": "MIT"
},
"node_modules/solady/src/utils/FixedPointMathLib.sol": {
"keccak256": "0x7afe0e9230d62d21b7bcaf26003b489e451fa91f73a50437a6cb506975ff5d91",
"urls": [
"bzz-raw://105454301879d0d8774b639f75bbf6dd7afcdc3d647f0026d85967e756394caa",
"dweb:/ipfs/QmddrUdQkVpjHtj8XZxbPU3iqkttdwFs4uDoWfnxU1SCee"
],
"license": "MIT"
},
"node_modules/solady/src/utils/LibClone.sol": {
"keccak256": "0x61a00bcf300f7af3850f63de1a6f400629f03652a1f3efa49a17bf6c2272b1df",
"urls": [
Expand All @@ -1276,19 +1245,19 @@
],
"license": "MIT"
},
"node_modules/solady/src/utils/SafeTransferLib.sol": {
"keccak256": "0x7d0de1ff3be5dc32635283280b000d4794015a1b61d7dae7f3ff7b0721b07210",
"node_modules/solady/src/utils/ReentrancyGuard.sol": {
"keccak256": "0xdb28f318ec45197a6c7cc2abebed67d7cb8b965838ef962e3844423256a9ddb8",
"urls": [
"bzz-raw://e307c9eece677565e7d584ee77c56134b5db38a70f557f9d2b1b308219276c0c",
"dweb:/ipfs/QmTEtqaTFgRBFGpJyb5o4v2w8yrSpcNThov4bNpcLr2tTR"
"bzz-raw://873cd46b77a2aeb781e7a0d131e7299151323ed884c330101a51d0727e218d98",
"dweb:/ipfs/QmddadCjyedztvdSgLZEyKWoRes2SqtpviSjhEbSNrkUoi"
],
"license": "MIT"
},
"src/facets/ownable/IERC173.sol": {
"keccak256": "0x187fcc652a498aa18be665689a8496daad50511e6d7d926be0a210469325cdd8",
"node_modules/solady/src/utils/SafeTransferLib.sol": {
"keccak256": "0x7d0de1ff3be5dc32635283280b000d4794015a1b61d7dae7f3ff7b0721b07210",
"urls": [
"bzz-raw://00c489916ad6e3ef2bfeb1d5f0230022cf776caab4b1372f0bf79b839810f1a2",
"dweb:/ipfs/QmV2h8sDoHeyZKvbKeJBk6WaS5F87QaDMCq3iEymsbrmVh"
"bzz-raw://e307c9eece677565e7d584ee77c56134b5db38a70f557f9d2b1b308219276c0c",
"dweb:/ipfs/QmTEtqaTFgRBFGpJyb5o4v2w8yrSpcNThov4bNpcLr2tTR"
],
"license": "MIT"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/Channels.json

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions packages/generated/dev/abis/Channels.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,7 @@
"settings": {
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@prb/=node_modules/@prb/",
"@prb/math/=node_modules/@prb/math/src/",
"@prb/test/=node_modules/@prb/test/src/",
"@river-build/diamond/=node_modules/@river-build/diamond/",
Expand Down Expand Up @@ -1415,11 +1416,19 @@
],
"license": "MIT"
},
"node_modules/@river-build/diamond/src/facets/ownable/IERC173.sol": {
"keccak256": "0x187fcc652a498aa18be665689a8496daad50511e6d7d926be0a210469325cdd8",
"urls": [
"bzz-raw://00c489916ad6e3ef2bfeb1d5f0230022cf776caab4b1372f0bf79b839810f1a2",
"dweb:/ipfs/QmV2h8sDoHeyZKvbKeJBk6WaS5F87QaDMCq3iEymsbrmVh"
],
"license": "MIT"
},
"node_modules/@river-build/diamond/src/facets/ownable/token/ITokenOwnable.sol": {
"keccak256": "0x1aa5a7e61796399bfab5d3a4b23fad8c393caf472d965b6dc8c8aa0efb184417",
"keccak256": "0x125ffc776682deecf6bbf36f4b33b762968a4e6ad182dd5a896fb92fd103b397",
"urls": [
"bzz-raw://312e57d67c076b8c9c4813d210920dc5f678d0efc043f5eb4103828696af0bc7",
"dweb:/ipfs/QmS7tY5kWPBPCxZCYQv4MfABJUccMDmuZT9Mnd82WSFCGx"
"bzz-raw://bdb1d0973416722e1f7772f9f0adb2d76a262c6cb667b5c3907076f4c9b3bd37",
"dweb:/ipfs/Qme3Xvaq4fWexPd6TAjWpqfmiQ1KCedKGXwE9nxrcv2Cw3"
],
"license": "MIT"
},
Expand Down Expand Up @@ -1462,14 +1471,6 @@
"dweb:/ipfs/QmVtPuvumAG5qRHinmdQn7wkEK3J4HK9gBB5LBDWbeTRNj"
],
"license": "MIT"
},
"src/facets/ownable/IERC173.sol": {
"keccak256": "0x187fcc652a498aa18be665689a8496daad50511e6d7d926be0a210469325cdd8",
"urls": [
"bzz-raw://00c489916ad6e3ef2bfeb1d5f0230022cf776caab4b1372f0bf79b839810f1a2",
"dweb:/ipfs/QmV2h8sDoHeyZKvbKeJBk6WaS5F87QaDMCq3iEymsbrmVh"
],
"license": "MIT"
}
},
"version": 1
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/Diamond.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/generated/dev/abis/Diamond.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
"settings": {
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@prb/=node_modules/@prb/",
"@prb/math/=node_modules/@prb/math/src/",
"@prb/test/=node_modules/@prb/test/src/",
"@river-build/diamond/=node_modules/@river-build/diamond/",
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/DiamondCutFacet.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/generated/dev/abis/DiamondCutFacet.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
"settings": {
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@prb/=node_modules/@prb/",
"@prb/math/=node_modules/@prb/math/src/",
"@prb/test/=node_modules/@prb/test/src/",
"@river-build/diamond/=node_modules/@river-build/diamond/",
Expand Down
2 changes: 1 addition & 1 deletion packages/generated/dev/abis/DropFacet.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/generated/dev/abis/DropFacet.metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@
"settings": {
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"@prb/=node_modules/@prb/",
"@prb/math/=node_modules/@prb/math/src/",
"@prb/test/=node_modules/@prb/test/src/",
"@river-build/diamond/=node_modules/@river-build/diamond/",
Expand Down
Loading

0 comments on commit 75837a7

Please sign in to comment.