From dfed938a0ef26a3d5b163c386816df7f1bd4de0f Mon Sep 17 00:00:00 2001 From: jj_ranalli Date: Thu, 28 Aug 2025 12:50:50 +0200 Subject: [PATCH 1/4] update pragma solidity to ^0.8.30 --- script/Deploy.s.sol | 2 +- script/ScriptUtils.sol | 2 +- script/Seed.s.sol | 2 +- script/WriteAddresses.s.sol | 2 +- script/generate-hook.sh | 104 +++++++++++------- src/hooks/actions/Allowlisted/Allowlisted.sol | 2 +- src/hooks/actions/ERC20Gated/ERC20Gated.sol | 2 +- .../actions/ERC20Gated/types/ERC20Gate.sol | 2 +- src/hooks/actions/ERC20Mint/ERC20Mint.sol | 2 +- .../actions/ERC20Mint/types/ERC20Data.sol | 2 +- .../ERC20Mint/utils/ERC20Mint_BaseToken.sol | 2 +- src/hooks/actions/ERC721Mint/ERC721Mint.sol | 2 +- .../actions/ERC721Mint/types/ERC721Data.sol | 2 +- .../ERC721Mint/utils/ERC721Mint_BaseToken.sol | 2 +- src/hooks/actions/NFTGated/NFTGated.sol | 2 +- src/hooks/actions/NFTGated/types/NFTGate.sol | 2 +- src/hooks/actions/actions.sol | 2 +- .../NFTDiscount/NFTDiscount.sol | 2 +- .../pricing/TieredDiscount/TieredDiscount.sol | 2 +- .../TieredDiscount/types/DiscountParams.sol | 2 +- .../LinearVRGDAPrices/LinearVRGDAPrices.sol | 2 +- .../LogisticVRGDAPrices.sol | 2 +- src/hooks/pricing/VRGDA/VRGDAPrices.sol | 2 +- .../VRGDA/types/LinearProductParams.sol | 2 +- .../pricing/VRGDA/types/LinearVRGDAParams.sol | 2 +- .../VRGDA/types/LogisticProductParams.sol | 2 +- .../VRGDA/types/LogisticVRGDAParams.sol | 2 +- src/hooks/pricing/pricing.sol | 2 +- .../FirstForFree/FirstForFree.sol | 2 +- .../FirstForFree/types/ProductParams.sol | 2 +- .../FirstForFree/types/TokenCondition.sol | 2 +- .../FirstForFree/utils/ITokenERC1155.sol | 2 +- src/hooks/pricingActions/pricingActions.sol | 2 +- src/interfaces/IHookRegistry.sol | 2 +- src/interfaces/IProductAction.sol | 2 +- src/interfaces/IProductPrice.sol | 2 +- src/utils/ProductAction.sol | 2 +- src/utils/ProductPrice.sol | 2 +- src/utils/ProductPriceAction.sol | 2 +- src/utils/RegistryProductAction.sol | 2 +- src/utils/RegistryProductPrice.sol | 2 +- src/utils/RegistryProductPriceAction.sol | 2 +- src/utils/math/SignedWadMath.sol | 2 +- test/actions/Allowlisted/Allowlisted.t.sol | 2 +- test/actions/ERC20Gated/ERC20Gated.t.sol | 2 +- .../ERC20Gated/mocks/MockERC20Gated.sol | 2 +- test/actions/ERC20Mint/ERC20Mint.t.sol | 2 +- test/actions/ERC721Mint/ERC721Mint.t.sol | 2 +- test/actions/NFTGated/NFTGated.t.sol | 2 +- test/actions/NFTGated/mocks/MockNFTGated.sol | 2 +- test/pricing/TieredDiscount/NFTDiscount.t.sol | 2 +- test/pricing/VRGDA/LinearVRGDA.t.sol | 2 +- test/pricing/VRGDA/LogisticVRGDA.t.sol | 2 +- .../correctness/LinearVRGDACorrectness.t.sol | 2 +- .../VRGDA/mocks/MockLinearVRGDAPrices.sol | 2 +- .../VRGDA/mocks/MockLogisticVRGDAPrices.sol | 2 +- .../FirstForFree/FirstForFree.t.sol | 2 +- test/utils/HookRegistryTest.sol | 2 +- test/utils/HookTest.sol | 2 +- test/utils/ProductActionTest.sol | 2 +- test/utils/ProductPriceActionTest.sol | 2 +- test/utils/ProductPriceTest.sol | 2 +- test/utils/RegistryProductActionTest.sol | 2 +- test/utils/RegistryProductPriceActionTest.sol | 2 +- test/utils/RegistryProductPriceTest.sol | 2 +- test/utils/mocks/MockERC1155.sol | 2 +- test/utils/mocks/MockERC20.sol | 2 +- test/utils/mocks/MockERC721.sol | 2 +- test/utils/mocks/MockProductsModule.sol | 2 +- 69 files changed, 135 insertions(+), 105 deletions(-) diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index 2335a30..184c75f 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {console} from "forge-std/console.sol"; import {VmSafe} from "forge-std/Vm.sol"; diff --git a/script/ScriptUtils.sol b/script/ScriptUtils.sol index 5d612f6..b65a1d5 100644 --- a/script/ScriptUtils.sol +++ b/script/ScriptUtils.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {console} from "forge-std/console.sol"; import {Script} from "forge-std/Script.sol"; diff --git a/script/Seed.s.sol b/script/Seed.s.sol index 5865aac..7cc035a 100644 --- a/script/Seed.s.sol +++ b/script/Seed.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {Script} from "forge-std/Script.sol"; import {CommonStorage} from "slice/utils/CommonStorage.sol"; diff --git a/script/WriteAddresses.s.sol b/script/WriteAddresses.s.sol index bddbafc..2e2e84f 100644 --- a/script/WriteAddresses.s.sol +++ b/script/WriteAddresses.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {SetUpContractsList} from "./ScriptUtils.sol"; diff --git a/script/generate-hook.sh b/script/generate-hook.sh index 52dfb01..5b3fe30 100755 --- a/script/generate-hook.sh +++ b/script/generate-hook.sh @@ -79,17 +79,31 @@ echo -e "${GREEN}✓ Contract name: ${CONTRACT_NAME}${NC}" # Check for duplicate hook names EXISTING_DIRS="" -case $TYPE in - "action") - EXISTING_DIRS="src/hooks/actions/${CONTRACT_NAME}" - ;; - "pricing-strategy") - EXISTING_DIRS="src/hooks/pricing/${CONTRACT_NAME}" - ;; - "pricing-action") - EXISTING_DIRS="src/hooks/pricingActions/${CONTRACT_NAME}" - ;; -esac +if [ "$SCOPE" = "registry" ]; then + case $TYPE in + "action") + EXISTING_DIRS="src/hooks/actions/${CONTRACT_NAME}" + ;; + "pricing-strategy") + EXISTING_DIRS="src/hooks/pricing/${CONTRACT_NAME}" + ;; + "pricing-action") + EXISTING_DIRS="src/hooks/pricingActions/${CONTRACT_NAME}" + ;; + esac +else + case $TYPE in + "action") + EXISTING_DIRS="src/custom/actions/${CONTRACT_NAME}" + ;; + "pricing-strategy") + EXISTING_DIRS="src/custom/pricing/${CONTRACT_NAME}" + ;; + "pricing-action") + EXISTING_DIRS="src/custom/pricingActions/${CONTRACT_NAME}" + ;; + esac +fi if [ -d "$EXISTING_DIRS" ]; then echo -e "${RED}✗ Error: Hook '${CONTRACT_NAME}' already exists at ${EXISTING_DIRS}${NC}" @@ -107,18 +121,33 @@ fi echo -e "${GREEN}✓ Author: ${AUTHOR}${NC}" echo -# Set directory based on type -case $TYPE in - "action") - DIR="src/hooks/actions/${CONTRACT_NAME}" - ;; - "pricing-strategy") - DIR="src/hooks/pricing/${CONTRACT_NAME}" - ;; - "pricing-action") - DIR="src/hooks/pricingActions/${CONTRACT_NAME}" - ;; -esac +# Set directory based on scope and type +if [ "$SCOPE" = "registry" ]; then + case $TYPE in + "action") + DIR="src/hooks/actions/${CONTRACT_NAME}" + ;; + "pricing-strategy") + DIR="src/hooks/pricing/${CONTRACT_NAME}" + ;; + "pricing-action") + DIR="src/hooks/pricingActions/${CONTRACT_NAME}" + ;; + esac +else + # Product-specific hooks go in custom directory + case $TYPE in + "action") + DIR="src/custom/actions/${CONTRACT_NAME}" + ;; + "pricing-strategy") + DIR="src/custom/pricing/${CONTRACT_NAME}" + ;; + "pricing-action") + DIR="src/custom/pricingActions/${CONTRACT_NAME}" + ;; + esac +fi # Create directory mkdir -p "$DIR" @@ -132,7 +161,7 @@ echo -e "${BLUE}Generating contract at: ${FILE_PATH}${NC}" if [ "$SCOPE" = "registry" ] && [ "$TYPE" = "action" ]; then cat > "$FILE_PATH" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import { RegistryProductAction, @@ -209,7 +238,7 @@ EOF elif [ "$SCOPE" = "product" ] && [ "$TYPE" = "action" ]; then cat > "$FILE_PATH" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ProductAction, IProductsModule, IProductAction} from "@/utils/ProductAction.sol"; @@ -265,7 +294,7 @@ EOF elif [ "$SCOPE" = "registry" ] && [ "$TYPE" = "pricing-strategy" ]; then cat > "$FILE_PATH" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import { RegistryProductPrice, @@ -325,7 +354,7 @@ EOF elif [ "$SCOPE" = "product" ] && [ "$TYPE" = "pricing-strategy" ]; then cat > "$FILE_PATH" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ProductPrice, IProductsModule, IProductPrice} from "@/utils/ProductPrice.sol"; @@ -366,7 +395,7 @@ EOF elif [ "$SCOPE" = "registry" ] && [ "$TYPE" = "pricing-action" ]; then cat > "$FILE_PATH" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import { RegistryProductPriceAction, @@ -459,7 +488,7 @@ EOF elif [ "$SCOPE" = "product" ] && [ "$TYPE" = "pricing-action" ]; then cat > "$FILE_PATH" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import { ProductPriceAction, @@ -633,7 +662,7 @@ if [ "$SCOPE" = "registry" ]; then if [ "$TYPE" = "action" ]; then cat > "$TEST_FILE" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductAction, RegistryProductActionTest} from "@test/utils/RegistryProductActionTest.sol"; import {CONTRACT_NAME} from "@/hooks/actions/CONTRACT_NAME/CONTRACT_NAME.sol"; @@ -708,7 +737,7 @@ EOF elif [ "$TYPE" = "pricing-strategy" ]; then cat > "$TEST_FILE" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductPrice, RegistryProductPriceTest} from "@test/utils/RegistryProductPriceTest.sol"; import {CONTRACT_NAME} from "@/hooks/pricing/CONTRACT_NAME/CONTRACT_NAME.sol"; @@ -763,7 +792,7 @@ EOF elif [ "$TYPE" = "pricing-action" ]; then cat > "$TEST_FILE" << 'EOF' // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductPriceAction, RegistryProductPriceActionTest} from "@test/utils/RegistryProductPriceActionTest.sol"; import {CONTRACT_NAME} from "@/hooks/pricingActions/CONTRACT_NAME/CONTRACT_NAME.sol"; @@ -866,8 +895,9 @@ fi echo echo -e "${YELLOW}Next steps:${NC}" -echo "1. Review and customize the generated contract" -echo "2. Implement your specific contract logic" -echo "3. Update the test file with your test cases" -echo "4. Run tests with 'forge test'" -echo "5. Deploy using the deployment scripts" \ No newline at end of file +echo "1. Customize the generated contract with your custom logic" +echo "2. Update the test file with your test cases" +echo "3. Run tests with 'forge test'" +if [ "$SCOPE" = "registry" ]; then + echo "4. Deploy by running './script/deploy.sh'" +fi \ No newline at end of file diff --git a/src/hooks/actions/Allowlisted/Allowlisted.sol b/src/hooks/actions/Allowlisted/Allowlisted.sol index 01e7811..ab4e539 100644 --- a/src/hooks/actions/Allowlisted/Allowlisted.sol +++ b/src/hooks/actions/Allowlisted/Allowlisted.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {MerkleProof} from "@openzeppelin-4.8.0/utils/cryptography/MerkleProof.sol"; import { diff --git a/src/hooks/actions/ERC20Gated/ERC20Gated.sol b/src/hooks/actions/ERC20Gated/ERC20Gated.sol index 2072bce..f4964dc 100644 --- a/src/hooks/actions/ERC20Gated/ERC20Gated.sol +++ b/src/hooks/actions/ERC20Gated/ERC20Gated.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ERC20Gate} from "./types/ERC20Gate.sol"; import { diff --git a/src/hooks/actions/ERC20Gated/types/ERC20Gate.sol b/src/hooks/actions/ERC20Gated/types/ERC20Gate.sol index 9b75f39..24c18c3 100644 --- a/src/hooks/actions/ERC20Gated/types/ERC20Gate.sol +++ b/src/hooks/actions/ERC20Gated/types/ERC20Gate.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IERC20} from "@openzeppelin-4.8.0/interfaces/IERC20.sol"; diff --git a/src/hooks/actions/ERC20Mint/ERC20Mint.sol b/src/hooks/actions/ERC20Mint/ERC20Mint.sol index 002da81..a6ab8d3 100644 --- a/src/hooks/actions/ERC20Mint/ERC20Mint.sol +++ b/src/hooks/actions/ERC20Mint/ERC20Mint.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import { IProductsModule, diff --git a/src/hooks/actions/ERC20Mint/types/ERC20Data.sol b/src/hooks/actions/ERC20Mint/types/ERC20Data.sol index 0af5a39..daf9b2f 100644 --- a/src/hooks/actions/ERC20Mint/types/ERC20Data.sol +++ b/src/hooks/actions/ERC20Mint/types/ERC20Data.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ERC20Mint_BaseToken} from "../utils/ERC20Mint_BaseToken.sol"; diff --git a/src/hooks/actions/ERC20Mint/utils/ERC20Mint_BaseToken.sol b/src/hooks/actions/ERC20Mint/utils/ERC20Mint_BaseToken.sol index a1cc676..6ca57e3 100644 --- a/src/hooks/actions/ERC20Mint/utils/ERC20Mint_BaseToken.sol +++ b/src/hooks/actions/ERC20Mint/utils/ERC20Mint_BaseToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ERC20} from "@openzeppelin-4.8.0/token/ERC20/ERC20.sol"; diff --git a/src/hooks/actions/ERC721Mint/ERC721Mint.sol b/src/hooks/actions/ERC721Mint/ERC721Mint.sol index 6e70849..8d3a18f 100644 --- a/src/hooks/actions/ERC721Mint/ERC721Mint.sol +++ b/src/hooks/actions/ERC721Mint/ERC721Mint.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IProductsModule, RegistryProductAction, HookRegistry, IHookRegistry} from "@/utils/RegistryProductAction.sol"; import {MAX_ROYALTY, ERC721Mint_BaseToken} from "./utils/ERC721Mint_BaseToken.sol"; diff --git a/src/hooks/actions/ERC721Mint/types/ERC721Data.sol b/src/hooks/actions/ERC721Mint/types/ERC721Data.sol index 2f57fcd..d0ef849 100644 --- a/src/hooks/actions/ERC721Mint/types/ERC721Data.sol +++ b/src/hooks/actions/ERC721Mint/types/ERC721Data.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ERC721Mint_BaseToken} from "../utils/ERC721Mint_BaseToken.sol"; diff --git a/src/hooks/actions/ERC721Mint/utils/ERC721Mint_BaseToken.sol b/src/hooks/actions/ERC721Mint/utils/ERC721Mint_BaseToken.sol index 3107127..9180b2f 100644 --- a/src/hooks/actions/ERC721Mint/utils/ERC721Mint_BaseToken.sol +++ b/src/hooks/actions/ERC721Mint/utils/ERC721Mint_BaseToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ERC721A} from "@erc721a/ERC721A.sol"; import {IERC2981, IERC165} from "@openzeppelin-4.8.0/interfaces/IERC2981.sol"; diff --git a/src/hooks/actions/NFTGated/NFTGated.sol b/src/hooks/actions/NFTGated/NFTGated.sol index 6301723..b792296 100644 --- a/src/hooks/actions/NFTGated/NFTGated.sol +++ b/src/hooks/actions/NFTGated/NFTGated.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IERC721} from "@openzeppelin-4.8.0/interfaces/IERC721.sol"; import {IERC1155} from "@openzeppelin-4.8.0/interfaces/IERC1155.sol"; diff --git a/src/hooks/actions/NFTGated/types/NFTGate.sol b/src/hooks/actions/NFTGated/types/NFTGate.sol index bb54a52..e96cb10 100644 --- a/src/hooks/actions/NFTGated/types/NFTGate.sol +++ b/src/hooks/actions/NFTGated/types/NFTGate.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; enum NftType { ERC721, diff --git a/src/hooks/actions/actions.sol b/src/hooks/actions/actions.sol index def3994..31d8f3f 100644 --- a/src/hooks/actions/actions.sol +++ b/src/hooks/actions/actions.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {Allowlisted} from "./Allowlisted/Allowlisted.sol"; import {ERC20Gated} from "./ERC20Gated/ERC20Gated.sol"; diff --git a/src/hooks/pricing/TieredDiscount/NFTDiscount/NFTDiscount.sol b/src/hooks/pricing/TieredDiscount/NFTDiscount/NFTDiscount.sol index a118958..26a586f 100644 --- a/src/hooks/pricing/TieredDiscount/NFTDiscount/NFTDiscount.sol +++ b/src/hooks/pricing/TieredDiscount/NFTDiscount/NFTDiscount.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IERC721} from "@openzeppelin-4.8.0/token/ERC721/IERC721.sol"; import {IERC1155} from "@openzeppelin-4.8.0/token/ERC1155/IERC1155.sol"; diff --git a/src/hooks/pricing/TieredDiscount/TieredDiscount.sol b/src/hooks/pricing/TieredDiscount/TieredDiscount.sol index ce1d270..0d85557 100644 --- a/src/hooks/pricing/TieredDiscount/TieredDiscount.sol +++ b/src/hooks/pricing/TieredDiscount/TieredDiscount.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IProductsModule} from "slice/interfaces/IProductsModule.sol"; import {RegistryProductPrice, IProductPrice} from "@/utils/RegistryProductPrice.sol"; diff --git a/src/hooks/pricing/TieredDiscount/types/DiscountParams.sol b/src/hooks/pricing/TieredDiscount/types/DiscountParams.sol index 26c1a2d..c12c8e2 100644 --- a/src/hooks/pricing/TieredDiscount/types/DiscountParams.sol +++ b/src/hooks/pricing/TieredDiscount/types/DiscountParams.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; enum NFTType { ERC721, diff --git a/src/hooks/pricing/VRGDA/LinearVRGDAPrices/LinearVRGDAPrices.sol b/src/hooks/pricing/VRGDA/LinearVRGDAPrices/LinearVRGDAPrices.sol index cc6b61a..ab0ad08 100644 --- a/src/hooks/pricing/VRGDA/LinearVRGDAPrices/LinearVRGDAPrices.sol +++ b/src/hooks/pricing/VRGDA/LinearVRGDAPrices/LinearVRGDAPrices.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookRegistry, IProductPrice, IHookRegistry, IProductsModule} from "@/utils/RegistryProductPrice.sol"; import {wadLn, unsafeWadDiv, toDaysWadUnsafe} from "@/utils/math/SignedWadMath.sol"; diff --git a/src/hooks/pricing/VRGDA/LogisticVRGDAPrices/LogisticVRGDAPrices.sol b/src/hooks/pricing/VRGDA/LogisticVRGDAPrices/LogisticVRGDAPrices.sol index 6e0bb39..5a0a114 100644 --- a/src/hooks/pricing/VRGDA/LogisticVRGDAPrices/LogisticVRGDAPrices.sol +++ b/src/hooks/pricing/VRGDA/LogisticVRGDAPrices/LogisticVRGDAPrices.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookRegistry, IProductPrice, IHookRegistry, IProductsModule} from "@/utils/RegistryProductPrice.sol"; import { diff --git a/src/hooks/pricing/VRGDA/VRGDAPrices.sol b/src/hooks/pricing/VRGDA/VRGDAPrices.sol index a8ffd55..949977f 100644 --- a/src/hooks/pricing/VRGDA/VRGDAPrices.sol +++ b/src/hooks/pricing/VRGDA/VRGDAPrices.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {wadExp, wadMul, unsafeWadMul, toWadUnsafe} from "@/utils/math/SignedWadMath.sol"; import {IProductsModule, RegistryProductPrice} from "@/utils/RegistryProductPrice.sol"; diff --git a/src/hooks/pricing/VRGDA/types/LinearProductParams.sol b/src/hooks/pricing/VRGDA/types/LinearProductParams.sol index a15829b..365e992 100644 --- a/src/hooks/pricing/VRGDA/types/LinearProductParams.sol +++ b/src/hooks/pricing/VRGDA/types/LinearProductParams.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {LinearVRGDAParams} from "./LinearVRGDAParams.sol"; diff --git a/src/hooks/pricing/VRGDA/types/LinearVRGDAParams.sol b/src/hooks/pricing/VRGDA/types/LinearVRGDAParams.sol index c3f591f..563c36b 100644 --- a/src/hooks/pricing/VRGDA/types/LinearVRGDAParams.sol +++ b/src/hooks/pricing/VRGDA/types/LinearVRGDAParams.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; /// @param targetPrice Target price for a product, to be scaled according to sales pace. /// @param min minimum price to be paid for a token, scaled by 1e18 diff --git a/src/hooks/pricing/VRGDA/types/LogisticProductParams.sol b/src/hooks/pricing/VRGDA/types/LogisticProductParams.sol index 0b1181a..fecc2bb 100644 --- a/src/hooks/pricing/VRGDA/types/LogisticProductParams.sol +++ b/src/hooks/pricing/VRGDA/types/LogisticProductParams.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {LogisticVRGDAParams} from "./LogisticVRGDAParams.sol"; diff --git a/src/hooks/pricing/VRGDA/types/LogisticVRGDAParams.sol b/src/hooks/pricing/VRGDA/types/LogisticVRGDAParams.sol index 31a3576..15da7a1 100644 --- a/src/hooks/pricing/VRGDA/types/LogisticVRGDAParams.sol +++ b/src/hooks/pricing/VRGDA/types/LogisticVRGDAParams.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; /// @param targetPrice Target price for a product, to be scaled according to sales pace. /// @param min minimum price to be paid for a token, scaled by 1e18 diff --git a/src/hooks/pricing/pricing.sol b/src/hooks/pricing/pricing.sol index 47b0454..1dfa7b8 100644 --- a/src/hooks/pricing/pricing.sol +++ b/src/hooks/pricing/pricing.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {LinearVRGDAPrices} from "./VRGDA/LinearVRGDAPrices/LinearVRGDAPrices.sol"; import {LogisticVRGDAPrices} from "./VRGDA/LogisticVRGDAPrices/LogisticVRGDAPrices.sol"; diff --git a/src/hooks/pricingActions/FirstForFree/FirstForFree.sol b/src/hooks/pricingActions/FirstForFree/FirstForFree.sol index f9ec506..ff2f870 100644 --- a/src/hooks/pricingActions/FirstForFree/FirstForFree.sol +++ b/src/hooks/pricingActions/FirstForFree/FirstForFree.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IERC721} from "@openzeppelin-4.8.0/interfaces/IERC721.sol"; import {IERC1155} from "@openzeppelin-4.8.0/interfaces/IERC1155.sol"; diff --git a/src/hooks/pricingActions/FirstForFree/types/ProductParams.sol b/src/hooks/pricingActions/FirstForFree/types/ProductParams.sol index a77e158..2e7c964 100644 --- a/src/hooks/pricingActions/FirstForFree/types/ProductParams.sol +++ b/src/hooks/pricingActions/FirstForFree/types/ProductParams.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {TokenCondition} from "./TokenCondition.sol"; diff --git a/src/hooks/pricingActions/FirstForFree/types/TokenCondition.sol b/src/hooks/pricingActions/FirstForFree/types/TokenCondition.sol index 044e5c5..91319cf 100644 --- a/src/hooks/pricingActions/FirstForFree/types/TokenCondition.sol +++ b/src/hooks/pricingActions/FirstForFree/types/TokenCondition.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; struct TokenCondition { address tokenAddress; diff --git a/src/hooks/pricingActions/FirstForFree/utils/ITokenERC1155.sol b/src/hooks/pricingActions/FirstForFree/utils/ITokenERC1155.sol index 4664ec3..e8e91db 100644 --- a/src/hooks/pricingActions/FirstForFree/utils/ITokenERC1155.sol +++ b/src/hooks/pricingActions/FirstForFree/utils/ITokenERC1155.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; interface ITokenERC1155 { /** diff --git a/src/hooks/pricingActions/pricingActions.sol b/src/hooks/pricingActions/pricingActions.sol index 623127c..037a6ef 100644 --- a/src/hooks/pricingActions/pricingActions.sol +++ b/src/hooks/pricingActions/pricingActions.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {FirstForFree} from "./FirstForFree/FirstForFree.sol"; diff --git a/src/interfaces/IHookRegistry.sol b/src/interfaces/IHookRegistry.sol index d55495a..1b04144 100644 --- a/src/interfaces/IHookRegistry.sol +++ b/src/interfaces/IHookRegistry.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/interfaces/hooks/IHookRegistry.sol"; diff --git a/src/interfaces/IProductAction.sol b/src/interfaces/IProductAction.sol index c950a3c..1fd0423 100644 --- a/src/interfaces/IProductAction.sol +++ b/src/interfaces/IProductAction.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/interfaces/hooks/IProductAction.sol"; diff --git a/src/interfaces/IProductPrice.sol b/src/interfaces/IProductPrice.sol index 898fcca..fb9c752 100644 --- a/src/interfaces/IProductPrice.sol +++ b/src/interfaces/IProductPrice.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/interfaces/hooks/IProductPrice.sol"; diff --git a/src/utils/ProductAction.sol b/src/utils/ProductAction.sol index cd76334..3773da0 100644 --- a/src/utils/ProductAction.sol +++ b/src/utils/ProductAction.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/utils/hooks/ProductAction.sol"; diff --git a/src/utils/ProductPrice.sol b/src/utils/ProductPrice.sol index 0192baa..7d84504 100644 --- a/src/utils/ProductPrice.sol +++ b/src/utils/ProductPrice.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/utils/hooks/ProductPrice.sol"; diff --git a/src/utils/ProductPriceAction.sol b/src/utils/ProductPriceAction.sol index 4acadb5..63634ac 100644 --- a/src/utils/ProductPriceAction.sol +++ b/src/utils/ProductPriceAction.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/utils/hooks/ProductPriceAction.sol"; diff --git a/src/utils/RegistryProductAction.sol b/src/utils/RegistryProductAction.sol index 6b7f75a..37adfad 100644 --- a/src/utils/RegistryProductAction.sol +++ b/src/utils/RegistryProductAction.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/utils/hooks/RegistryProductAction.sol"; diff --git a/src/utils/RegistryProductPrice.sol b/src/utils/RegistryProductPrice.sol index be178fd..282c9dd 100644 --- a/src/utils/RegistryProductPrice.sol +++ b/src/utils/RegistryProductPrice.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/utils/hooks/RegistryProductPrice.sol"; diff --git a/src/utils/RegistryProductPriceAction.sol b/src/utils/RegistryProductPriceAction.sol index 8196d88..01bf28d 100644 --- a/src/utils/RegistryProductPriceAction.sol +++ b/src/utils/RegistryProductPriceAction.sol @@ -1,4 +1,4 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "slice/utils/hooks/RegistryProductPriceAction.sol"; diff --git a/src/utils/math/SignedWadMath.sol b/src/utils/math/SignedWadMath.sol index 14dfc8e..39f83aa 100644 --- a/src/utils/math/SignedWadMath.sol +++ b/src/utils/math/SignedWadMath.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; /// @title Signed Wad Math /// @author transmissions11 diff --git a/test/actions/Allowlisted/Allowlisted.t.sol b/test/actions/Allowlisted/Allowlisted.t.sol index c8ea84d..a59108f 100644 --- a/test/actions/Allowlisted/Allowlisted.t.sol +++ b/test/actions/Allowlisted/Allowlisted.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductActionTest} from "@test/utils/RegistryProductActionTest.sol"; import {Merkle} from "@test/utils/murky/Merkle.sol"; diff --git a/test/actions/ERC20Gated/ERC20Gated.t.sol b/test/actions/ERC20Gated/ERC20Gated.t.sol index 1806ab7..a4d8ea3 100644 --- a/test/actions/ERC20Gated/ERC20Gated.t.sol +++ b/test/actions/ERC20Gated/ERC20Gated.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductActionTest} from "@test/utils/RegistryProductActionTest.sol"; import {MockERC20Gated} from "./mocks/MockERC20Gated.sol"; diff --git a/test/actions/ERC20Gated/mocks/MockERC20Gated.sol b/test/actions/ERC20Gated/mocks/MockERC20Gated.sol index fb77b8f..ea96650 100644 --- a/test/actions/ERC20Gated/mocks/MockERC20Gated.sol +++ b/test/actions/ERC20Gated/mocks/MockERC20Gated.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IProductsModule, ERC20Gated, ERC20Gate} from "@/hooks/actions/ERC20Gated/ERC20Gated.sol"; diff --git a/test/actions/ERC20Mint/ERC20Mint.t.sol b/test/actions/ERC20Mint/ERC20Mint.t.sol index e1e1fc4..48921cc 100644 --- a/test/actions/ERC20Mint/ERC20Mint.t.sol +++ b/test/actions/ERC20Mint/ERC20Mint.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductAction, RegistryProductActionTest} from "@test/utils/RegistryProductActionTest.sol"; import {ERC20Mint} from "@/hooks/actions/ERC20Mint/ERC20Mint.sol"; diff --git a/test/actions/ERC721Mint/ERC721Mint.t.sol b/test/actions/ERC721Mint/ERC721Mint.t.sol index cee15be..9a25bc2 100644 --- a/test/actions/ERC721Mint/ERC721Mint.t.sol +++ b/test/actions/ERC721Mint/ERC721Mint.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductActionTest} from "@test/utils/RegistryProductActionTest.sol"; import {ERC721Mint} from "@/hooks/actions/ERC721Mint/ERC721Mint.sol"; diff --git a/test/actions/NFTGated/NFTGated.t.sol b/test/actions/NFTGated/NFTGated.t.sol index 6e3134f..10e2b23 100644 --- a/test/actions/NFTGated/NFTGated.t.sol +++ b/test/actions/NFTGated/NFTGated.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductActionTest} from "@test/utils/RegistryProductActionTest.sol"; import {MockNFTGated} from "./mocks/MockNFTGated.sol"; diff --git a/test/actions/NFTGated/mocks/MockNFTGated.sol b/test/actions/NFTGated/mocks/MockNFTGated.sol index 4f944c4..d246076 100644 --- a/test/actions/NFTGated/mocks/MockNFTGated.sol +++ b/test/actions/NFTGated/mocks/MockNFTGated.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IProductsModule, NFTGated, NFTGate} from "@/hooks/actions/NFTGated/NFTGated.sol"; diff --git a/test/pricing/TieredDiscount/NFTDiscount.t.sol b/test/pricing/TieredDiscount/NFTDiscount.t.sol index 77d0a7e..0aaab39 100644 --- a/test/pricing/TieredDiscount/NFTDiscount.t.sol +++ b/test/pricing/TieredDiscount/NFTDiscount.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductPriceTest} from "@test/utils/RegistryProductPriceTest.sol"; import {console2} from "forge-std/console2.sol"; diff --git a/test/pricing/VRGDA/LinearVRGDA.t.sol b/test/pricing/VRGDA/LinearVRGDA.t.sol index 249bb26..1b57588 100644 --- a/test/pricing/VRGDA/LinearVRGDA.t.sol +++ b/test/pricing/VRGDA/LinearVRGDA.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductPriceTest} from "@test/utils/RegistryProductPriceTest.sol"; import {wadLn, toWadUnsafe, toDaysWadUnsafe, fromDaysWadUnsafe} from "@/utils/math/SignedWadMath.sol"; diff --git a/test/pricing/VRGDA/LogisticVRGDA.t.sol b/test/pricing/VRGDA/LogisticVRGDA.t.sol index ce4bb18..654e3af 100644 --- a/test/pricing/VRGDA/LogisticVRGDA.t.sol +++ b/test/pricing/VRGDA/LogisticVRGDA.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductPriceTest} from "@test/utils/RegistryProductPriceTest.sol"; import {unsafeDiv, wadLn, toWadUnsafe, toDaysWadUnsafe, fromDaysWadUnsafe} from "@/utils/math/SignedWadMath.sol"; diff --git a/test/pricing/VRGDA/correctness/LinearVRGDACorrectness.t.sol b/test/pricing/VRGDA/correctness/LinearVRGDACorrectness.t.sol index 5cb158c..105432f 100644 --- a/test/pricing/VRGDA/correctness/LinearVRGDACorrectness.t.sol +++ b/test/pricing/VRGDA/correctness/LinearVRGDACorrectness.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {console} from "forge-std/console.sol"; import {Vm} from "forge-std/Vm.sol"; diff --git a/test/pricing/VRGDA/mocks/MockLinearVRGDAPrices.sol b/test/pricing/VRGDA/mocks/MockLinearVRGDAPrices.sol index 61226a7..c36a1da 100644 --- a/test/pricing/VRGDA/mocks/MockLinearVRGDAPrices.sol +++ b/test/pricing/VRGDA/mocks/MockLinearVRGDAPrices.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "@/hooks/pricing/VRGDA/LinearVRGDAPrices/LinearVRGDAPrices.sol"; diff --git a/test/pricing/VRGDA/mocks/MockLogisticVRGDAPrices.sol b/test/pricing/VRGDA/mocks/MockLogisticVRGDAPrices.sol index 0f7d0f7..8c7f1b6 100644 --- a/test/pricing/VRGDA/mocks/MockLogisticVRGDAPrices.sol +++ b/test/pricing/VRGDA/mocks/MockLogisticVRGDAPrices.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "@/hooks/pricing/VRGDA/LogisticVRGDAPrices/LogisticVRGDAPrices.sol"; diff --git a/test/pricingActions/FirstForFree/FirstForFree.t.sol b/test/pricingActions/FirstForFree/FirstForFree.t.sol index a9f3ed6..a4bbfa9 100644 --- a/test/pricingActions/FirstForFree/FirstForFree.t.sol +++ b/test/pricingActions/FirstForFree/FirstForFree.t.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {RegistryProductPriceActionTest} from "@test/utils/RegistryProductPriceActionTest.sol"; import {FirstForFree} from "@/hooks/pricingActions/FirstForFree/FirstForFree.sol"; diff --git a/test/utils/HookRegistryTest.sol b/test/utils/HookRegistryTest.sol index b73ad6e..f381db1 100644 --- a/test/utils/HookRegistryTest.sol +++ b/test/utils/HookRegistryTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookTest} from "./HookTest.sol"; import {IHookRegistry} from "@/utils/RegistryProductPrice.sol"; diff --git a/test/utils/HookTest.sol b/test/utils/HookTest.sol index 0cf6ad7..2c29e90 100644 --- a/test/utils/HookTest.sol +++ b/test/utils/HookTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {Test} from "forge-std/Test.sol"; import {IProductsModule} from "@/utils/ProductAction.sol"; diff --git a/test/utils/ProductActionTest.sol b/test/utils/ProductActionTest.sol index e109c0b..ef4f28e 100644 --- a/test/utils/ProductActionTest.sol +++ b/test/utils/ProductActionTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookTest} from "./HookTest.sol"; import {ProductAction, IProductAction} from "@/utils/ProductAction.sol"; diff --git a/test/utils/ProductPriceActionTest.sol b/test/utils/ProductPriceActionTest.sol index e2c52a0..cbf0476 100644 --- a/test/utils/ProductPriceActionTest.sol +++ b/test/utils/ProductPriceActionTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookTest} from "./HookTest.sol"; import {ProductAction, ProductPriceAction, IProductAction, IProductPrice} from "@/utils/ProductPriceAction.sol"; diff --git a/test/utils/ProductPriceTest.sol b/test/utils/ProductPriceTest.sol index 5246c5b..46a5ad6 100644 --- a/test/utils/ProductPriceTest.sol +++ b/test/utils/ProductPriceTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookTest} from "./HookTest.sol"; import {IProductPrice} from "@/utils/ProductPrice.sol"; diff --git a/test/utils/RegistryProductActionTest.sol b/test/utils/RegistryProductActionTest.sol index c678d4e..0205cbe 100644 --- a/test/utils/RegistryProductActionTest.sol +++ b/test/utils/RegistryProductActionTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookRegistryTest} from "./HookRegistryTest.sol"; import {RegistryProductAction, IHookRegistry, IProductAction} from "@/utils/RegistryProductAction.sol"; diff --git a/test/utils/RegistryProductPriceActionTest.sol b/test/utils/RegistryProductPriceActionTest.sol index 38e19b6..56b48dd 100644 --- a/test/utils/RegistryProductPriceActionTest.sol +++ b/test/utils/RegistryProductPriceActionTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookRegistryTest} from "./HookRegistryTest.sol"; import { diff --git a/test/utils/RegistryProductPriceTest.sol b/test/utils/RegistryProductPriceTest.sol index 1e93bae..6d236e6 100644 --- a/test/utils/RegistryProductPriceTest.sol +++ b/test/utils/RegistryProductPriceTest.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {HookRegistryTest} from "./HookRegistryTest.sol"; import {RegistryProductPrice, IHookRegistry, IProductPrice} from "@/utils/RegistryProductPrice.sol"; diff --git a/test/utils/mocks/MockERC1155.sol b/test/utils/mocks/MockERC1155.sol index eeb4383..11cb106 100644 --- a/test/utils/mocks/MockERC1155.sol +++ b/test/utils/mocks/MockERC1155.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ERC1155} from "@openzeppelin-4.8.0/token/ERC1155/ERC1155.sol"; diff --git a/test/utils/mocks/MockERC20.sol b/test/utils/mocks/MockERC20.sol index a3df2b7..986579d 100644 --- a/test/utils/mocks/MockERC20.sol +++ b/test/utils/mocks/MockERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import "@openzeppelin-4.8.0/token/ERC20/ERC20.sol"; diff --git a/test/utils/mocks/MockERC721.sol b/test/utils/mocks/MockERC721.sol index c3b4cc4..468e311 100644 --- a/test/utils/mocks/MockERC721.sol +++ b/test/utils/mocks/MockERC721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {ERC721} from "@openzeppelin-4.8.0/token/ERC721/ERC721.sol"; diff --git a/test/utils/mocks/MockProductsModule.sol b/test/utils/mocks/MockProductsModule.sol index 9dae500..0b8a4a9 100644 --- a/test/utils/mocks/MockProductsModule.sol +++ b/test/utils/mocks/MockProductsModule.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; // import {IProductsModule} from "@/utils/ProductAction.sol"; import {Test} from "forge-std/Test.sol"; From 03f0660274a63a90a088f1fe62584c58068a2e49 Mon Sep 17 00:00:00 2001 From: jj_ranalli Date: Thu, 28 Aug 2025 12:51:26 +0200 Subject: [PATCH 2/4] foundry.toml --- foundry.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index 7396af8..21edefc 100644 --- a/foundry.toml +++ b/foundry.toml @@ -51,5 +51,5 @@ forge-std = "1.9.7" erc721a = "4.3.0" [lint] -ignore = ["test/**/*.sol","script/**/*.sol", "src/interfaces/*.sol", "src/utils/*.sol", "src/hooks/actions/actions.sol", "src/hooks/pricing/pricing.sol", "src/hooks/pricingActions/pricingActions.sol", "src/examples/actions/BaseGirlsScout.sol"] +ignore = ["test/**/*.sol","script/**/*.sol", "src/interfaces/*.sol", "src/utils/*.sol", "src/hooks/actions/actions.sol", "src/hooks/pricing/pricing.sol", "src/hooks/pricingActions/pricingActions.sol"] exclude_lints=["mixed-case-function", "mixed-case-variable", "pascal-case-struct"] From 19b3729aab0b1ce5e8d87e063fd56a2bb7f85827 Mon Sep 17 00:00:00 2001 From: jj_ranalli Date: Thu, 28 Aug 2025 12:51:49 +0200 Subject: [PATCH 3/4] rename custom hooks --- README.md | 6 +++--- src/{examples => custom}/README.md | 4 ++-- .../BaseCafe_2.sol => custom/actions/BaseCafe/BaseCafe.sol} | 2 +- .../actions/BaseGirlsScout}/BaseGirlsScout.sol | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/{examples => custom}/README.md (96%) rename src/{examples/actions/BaseCafe_2.sol => custom/actions/BaseCafe/BaseCafe.sol} (98%) rename src/{examples/actions => custom/actions/BaseGirlsScout}/BaseGirlsScout.sol (99%) diff --git a/README.md b/README.md index 01ab177..bd44315 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Reusable contracts designed to support multiple products, automatically integrat Custom smart contracts tailored for individual products, integrated using the `custom` onchain action or pricing strategy in Slice. -- **[Examples](./src/examples/)**: Reference implementations and templates +- **[Custom](./src/custom/)**: Product-specific implementations All hooks inherit from base contracts in `src/utils/`. @@ -146,7 +146,7 @@ src/ │ ├── actions/ # Onchain actions (gating, rewards, etc.) │ ├── pricing/ # Pricing strategies (NFT discounts, VRGDA, etc.) │ └── pricingActions/ # Combined pricing + action hooks -├── examples/ # Product-specific reference implementations +├── custom/ # Product-specific custom hooks ├── interfaces/ # Core hook interfaces └── utils/ # Base contracts and utilities ``` @@ -156,4 +156,4 @@ src/ - [Actions Guide](./src/hooks/actions/README.md) - [Pricing Strategies Guide](./src/hooks/pricing/README.md) - [Pricing + Actions Guide](./src/hooks/pricingActions/README.md) -- [Example Implementations](./src/examples/README.md) \ No newline at end of file +- [Custom Implementations](./src/custom/README.md) \ No newline at end of file diff --git a/src/examples/README.md b/src/custom/README.md similarity index 96% rename from src/examples/README.md rename to src/custom/README.md index 5a75896..82d7523 100644 --- a/src/examples/README.md +++ b/src/custom/README.md @@ -1,6 +1,6 @@ -# Product-Specific Examples +# Product-Specific Custom Hooks -Reference implementations for custom product hooks without registry support. +Custom product hooks tailored for individual products without registry support. ## When to Use diff --git a/src/examples/actions/BaseCafe_2.sol b/src/custom/actions/BaseCafe/BaseCafe.sol similarity index 98% rename from src/examples/actions/BaseCafe_2.sol rename to src/custom/actions/BaseCafe/BaseCafe.sol index d7da230..eae2663 100644 --- a/src/examples/actions/BaseCafe_2.sol +++ b/src/custom/actions/BaseCafe/BaseCafe.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IProductsModule, ProductAction} from "@/utils/ProductAction.sol"; diff --git a/src/examples/actions/BaseGirlsScout.sol b/src/custom/actions/BaseGirlsScout/BaseGirlsScout.sol similarity index 99% rename from src/examples/actions/BaseGirlsScout.sol rename to src/custom/actions/BaseGirlsScout/BaseGirlsScout.sol index 9ca7860..7588422 100644 --- a/src/examples/actions/BaseGirlsScout.sol +++ b/src/custom/actions/BaseGirlsScout/BaseGirlsScout.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; +pragma solidity ^0.8.30; import {IProductsModule, ProductAction} from "@/utils/ProductAction.sol"; import {Ownable} from "@openzeppelin-4.8.0/access/Ownable.sol"; From 46a7b8d939b1c0981e1fd9ce18ae3100d8228160 Mon Sep 17 00:00:00 2001 From: jj_ranalli Date: Thu, 28 Aug 2025 12:53:30 +0200 Subject: [PATCH 4/4] update deps --- foundry.toml | 4 ++-- soldeer.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/foundry.toml b/foundry.toml index 21edefc..0f37899 100644 --- a/foundry.toml +++ b/foundry.toml @@ -7,7 +7,7 @@ dynamic_test_linking = true libs = ["dependencies", "../core/src", "../core/dependencies"] fs_permissions = [{ access = "read", path = "./src"}, { access= "read", path = "./broadcast/Deploy.s.sol/8453/run-latest.json"}, { access = "read-write", path = "./deployments"}, { access = "read", path = "./out"}] remappings = [ - "slice/=dependencies/slice-0.0.8/", + "slice/=dependencies/slice-0.0.9/", "@openzeppelin-4.8.0/=dependencies/@openzeppelin-contracts-4.8.0/", "@openzeppelin-upgradeable-4.8.0/=dependencies/@openzeppelin-contracts-upgradeable-4.8.0/", "@erc721a/=dependencies/erc721a-4.3.0/contracts/", @@ -44,7 +44,7 @@ remappings_generate = false remappings_regenerate = false [dependencies] -slice = "0.0.8" +slice = "0.0.9" forge-std = "1.9.7" "@openzeppelin-contracts" = "4.8.0" "@openzeppelin-contracts-upgradeable" = "4.8.0" diff --git a/soldeer.lock b/soldeer.lock index 8eca7b9..5684e03 100644 --- a/soldeer.lock +++ b/soldeer.lock @@ -28,7 +28,7 @@ integrity = "9e60fdba82bc374df80db7f2951faff6467b9091873004a3d314cf0c084b3c7d" [[dependencies]] name = "slice" -version = "0.0.8" -url = "https://soldeer-revisions.s3.amazonaws.com/slice/0_0_8_28-08-2025_00:55:13_src.zip" -checksum = "0df8789a04d00a6577f9be207aec4ea0057d9e79569dda522facbd7f04dbed2f" -integrity = "308b4ab7daad57e76ee001b55b2ebb19c707427bee3720fbbaad9d3c7b69021e" +version = "0.0.9" +url = "https://soldeer-revisions.s3.amazonaws.com/slice/0_0_9_28-08-2025_10:52:54_src.zip" +checksum = "7fb47bafed059724f2b4a56719eec2e131c231d9f9a8cbcde5d88958b649cd5d" +integrity = "7ef2c94c7be0d971da96d01d514903e007f957721da4bc0bd9fba004cebafd20"