@@ -4,9 +4,9 @@ This folder contains product-specific smart contract implementations that demons
44
55## Key Interfaces
66
7- ** IPricingStrategy ** :
7+ ** IProductPrice ** :
88``` solidity
9- interface IPricingStrategy {
9+ interface IProductPrice {
1010 function productPrice(
1111 uint256 slicerId,
1212 uint256 productId,
@@ -18,9 +18,9 @@ interface IPricingStrategy {
1818}
1919```
2020
21- ** IOnchainAction ** :
21+ ** IProductAction ** :
2222``` solidity
23- interface IOnchainAction {
23+ interface IProductAction {
2424 function isPurchaseAllowed(
2525 uint256 slicerId,
2626 uint256 productId,
@@ -43,15 +43,15 @@ interface IOnchainAction {
4343
4444## Base Contracts
4545
46- - ** OnchainAction ** : Add arbitrary requirements and/or custom logic after product purchase.
47- - ** PricingStrategy ** : Customize product pricing logic.
48- - ** PricingStrategyAction ** : Provide functionality of both Onchain Actions and Pricing Strategies
46+ - ** ProductAction ** : Add arbitrary requirements and/or custom logic after product purchase.
47+ - ** ProductPrice ** : Customize product pricing logic.
48+ - ** ProductPriceAction ** : Provide functionality of both Onchain Actions and Pricing Strategies
4949
5050## Key Differences from Registry Hooks
5151
5252Unlike the reusable hooks in ` /hooks/ ` , these examples:
5353- Are tailored for specific products/projects
54- - Inherit directly from base contracts (` OnchainAction ` , ` PricingStrategy ` )
54+ - Inherit directly from base contracts (` ProductAction ` , ` ProductPrice ` )
5555- Don't implement ` IHookRegistry ` (not intended for Slice frontend integration)
5656- Serve as reference implementations and starting points
5757
@@ -68,13 +68,13 @@ Unlike the reusable hooks in `/hooks/`, these examples:
6868
6969To create a custom product-specific onchain action:
7070
71- 1 . ** Inherit from OnchainAction ** :
71+ 1 . ** Inherit from ProductAction ** :
7272``` solidity
73- import {OnchainAction , IProductsModule} from "@/utils/OnchainAction .sol";
73+ import {ProductAction , IProductsModule} from "@/utils/ProductAction .sol";
7474
75- contract MyProductAction is OnchainAction {
75+ contract MyProductAction is ProductAction {
7676 constructor(IProductsModule productsModule, uint256 slicerId)
77- OnchainAction (productsModule, slicerId) {}
77+ ProductAction (productsModule, slicerId) {}
7878}
7979```
8080
@@ -108,13 +108,13 @@ function isPurchaseAllowed(
108108
109109To create a custom product-specific pricing strategy:
110110
111- 1 . ** Inherit from PricingStrategy ** :
111+ 1 . ** Inherit from ProductPrice ** :
112112``` solidity
113- import {PricingStrategy , IProductsModule} from "@/utils/PricingStrategy .sol";
113+ import {ProductPrice , IProductsModule} from "@/utils/ProductPrice .sol";
114114
115- contract MyProductAction is PricingStrategy {
115+ contract MyProductAction is ProductPrice {
116116 constructor(IProductsModule productsModule, uint256 slicerId)
117- PricingStrategy (productsModule, slicerId) {}
117+ ProductPrice (productsModule, slicerId) {}
118118}
119119```
120120
0 commit comments