diff --git a/docs/contracts/v4/reference/periphery/PositionManager.md b/docs/contracts/v4/reference/periphery/PositionManager.md index 9fad19185..930bb5413 100644 --- a/docs/contracts/v4/reference/periphery/PositionManager.md +++ b/docs/contracts/v4/reference/periphery/PositionManager.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[IPositionManager](/src/interfaces/IPositionManager.sol/interface.IPositionManager.md), [ERC721Permit_v4](/src/base/ERC721Permit_v4.sol/abstract.ERC721Permit_v4.md), [PoolInitializer](/src/base/PoolInitializer.sol/abstract.PoolInitializer.md), [Multicall_v4](/src/base/Multicall_v4.sol/abstract.Multicall_v4.md), [DeltaResolver](/src/base/DeltaResolver.sol/abstract.DeltaResolver.md), [ReentrancyLock](/src/base/ReentrancyLock.sol/contract.ReentrancyLock.md), [BaseActionsRouter](/src/base/BaseActionsRouter.sol/abstract.BaseActionsRouter.md), [Notifier](/src/base/Notifier.sol/abstract.Notifier.md), [Permit2Forwarder](/src/base/Permit2Forwarder.sol/contract.Permit2Forwarder.md) +[IPositionManager](contracts/v4/reference/periphery/interfaces/IPositionManager.md), [ERC721Permit_v4](contracts/v4/reference/periphery/base/ERC721Permit_v4.md), [PoolInitializer](contracts/v4/reference/periphery/base/PoolInitializer.md), [Multicall_v4](contracts/v4/reference/periphery/base/Multicall_v4.md), [DeltaResolver](contracts/v4/reference/periphery/base/DeltaResolver.md), [ReentrancyLock](contracts/v4/reference/periphery/base/ReentrancyLock.md), [BaseActionsRouter](contracts/v4/reference/periphery/base/BaseActionsRouter.md), [Notifier](contracts/v4/reference/periphery/base/Notifier.md), [Permit2Forwarder](contracts/v4/reference/periphery/base/Permit2Forwarder.md) The PositionManager (PosM) contract is responsible for creating liquidity positions on v4. PosM mints and manages ERC721 tokens associated with each position. diff --git a/docs/contracts/v4/reference/periphery/V4Router.md b/docs/contracts/v4/reference/periphery/V4Router.md index b65763fb5..6f660622f 100644 --- a/docs/contracts/v4/reference/periphery/V4Router.md +++ b/docs/contracts/v4/reference/periphery/V4Router.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[IV4Router](/src/interfaces/IV4Router.sol/interface.IV4Router.md), [BaseActionsRouter](/src/base/BaseActionsRouter.sol/abstract.BaseActionsRouter.md), [DeltaResolver](/src/base/DeltaResolver.sol/abstract.DeltaResolver.md) +[IV4Router](contracts/v4/reference/periphery/interfaces/IV4Router.md), [BaseActionsRouter](contracts/v4/reference/periphery/base/BaseActionsRouter.md), [DeltaResolver](contracts/v4/reference/periphery/base/DeltaResolver.md) Abstract contract that contains all internal logic needed for routing through Uniswap V4 pools diff --git a/docs/contracts/v4/reference/periphery/base/BaseActionsRouter.md b/docs/contracts/v4/reference/periphery/base/BaseActionsRouter.md index 7e7f60b27..b62d9e0d0 100644 --- a/docs/contracts/v4/reference/periphery/base/BaseActionsRouter.md +++ b/docs/contracts/v4/reference/periphery/base/BaseActionsRouter.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[SafeCallback](/src/base/SafeCallback.sol/abstract.SafeCallback.md) +[SafeCallback](contracts/v4/reference/periphery/base/SafeCallback.md) Abstract contract for performing a combination of actions on Uniswap v4. diff --git a/docs/contracts/v4/reference/periphery/base/BaseHook.md b/docs/contracts/v4/reference/periphery/base/BaseHook.md index 3452d4703..807a727d6 100644 --- a/docs/contracts/v4/reference/periphery/base/BaseHook.md +++ b/docs/contracts/v4/reference/periphery/base/BaseHook.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -IHooks, [SafeCallback](/src/base/SafeCallback.sol/abstract.SafeCallback.md) +IHooks, [SafeCallback](contracts/v4/reference/periphery/base/SafeCallback.md) abstract contract for hook implementations diff --git a/docs/contracts/v4/reference/periphery/base/BaseV4Quoter.md b/docs/contracts/v4/reference/periphery/base/BaseV4Quoter.md index abdc5dee0..19fc5ab59 100644 --- a/docs/contracts/v4/reference/periphery/base/BaseV4Quoter.md +++ b/docs/contracts/v4/reference/periphery/base/BaseV4Quoter.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[SafeCallback](/src/base/SafeCallback.sol/abstract.SafeCallback.md) +[SafeCallback](contracts/v4/reference/periphery/base/SafeCallback.md) ## Functions diff --git a/docs/contracts/v4/reference/periphery/base/DeltaResolver.md b/docs/contracts/v4/reference/periphery/base/DeltaResolver.md index 78039c14f..13f3a80ff 100644 --- a/docs/contracts/v4/reference/periphery/base/DeltaResolver.md +++ b/docs/contracts/v4/reference/periphery/base/DeltaResolver.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[ImmutableState](/src/base/ImmutableState.sol/contract.ImmutableState.md) +[ImmutableState](contracts/v4/reference/periphery/base/ImmutableState.md) Abstract contract used to sync, send, and settle funds to the pool manager diff --git a/docs/contracts/v4/reference/periphery/base/EIP712_v4.md b/docs/contracts/v4/reference/periphery/base/EIP712_v4.md index 9a0da213d..c6e7d86cc 100644 --- a/docs/contracts/v4/reference/periphery/base/EIP712_v4.md +++ b/docs/contracts/v4/reference/periphery/base/EIP712_v4.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[IEIP712_v4](/src/interfaces/IEIP712_v4.sol/interface.IEIP712_v4.md) +[IEIP712_v4](contracts/v4/reference/periphery/interfaces/IEIP712_v4.md) Generic EIP712 implementation diff --git a/docs/contracts/v4/reference/periphery/base/ERC721Permit_v4.md b/docs/contracts/v4/reference/periphery/base/ERC721Permit_v4.md index 5d1dc7b3d..f164a7986 100644 --- a/docs/contracts/v4/reference/periphery/base/ERC721Permit_v4.md +++ b/docs/contracts/v4/reference/periphery/base/ERC721Permit_v4.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -ERC721, [IERC721Permit_v4](/src/interfaces/IERC721Permit_v4.sol/interface.IERC721Permit_v4.md), [EIP712_v4](/src/base/EIP712_v4.sol/contract.EIP712_v4.md), [UnorderedNonce](/src/base/UnorderedNonce.sol/contract.UnorderedNonce.md) +ERC721, [IERC721Permit_v4](contracts/v4/reference/periphery/interfaces/IERC721Permit_v4.md), [EIP712_v4](contracts/v4/reference/periphery/base/EIP712_v4.md), [UnorderedNonce](contracts/v4/reference/periphery/base/UnorderedNonce.md) Nonfungible tokens that support an approve via signature, i.e. permit diff --git a/docs/contracts/v4/reference/periphery/base/Multicall_v4.md b/docs/contracts/v4/reference/periphery/base/Multicall_v4.md index 89d9c1442..b271c7c01 100644 --- a/docs/contracts/v4/reference/periphery/base/Multicall_v4.md +++ b/docs/contracts/v4/reference/periphery/base/Multicall_v4.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[IMulticall_v4](/src/interfaces/IMulticall_v4.sol/interface.IMulticall_v4.md) +[IMulticall_v4](contracts/v4/reference/periphery/interfaces/IMulticall_v4.md) Enables calling multiple methods in a single call to the contract diff --git a/docs/contracts/v4/reference/periphery/base/Notifier.md b/docs/contracts/v4/reference/periphery/base/Notifier.md index 72a15141e..4ae9c0e0d 100644 --- a/docs/contracts/v4/reference/periphery/base/Notifier.md +++ b/docs/contracts/v4/reference/periphery/base/Notifier.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[INotifier](/src/interfaces/INotifier.sol/interface.INotifier.md) +[INotifier](contracts/v4/reference/periphery/interfaces/INotifier.md) Notifier is used to opt in to sending updates to external contracts about position modifications or transfers diff --git a/docs/contracts/v4/reference/periphery/base/PoolInitializer.md b/docs/contracts/v4/reference/periphery/base/PoolInitializer.md index 1f708d22f..8539df017 100644 --- a/docs/contracts/v4/reference/periphery/base/PoolInitializer.md +++ b/docs/contracts/v4/reference/periphery/base/PoolInitializer.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[ImmutableState](/src/base/ImmutableState.sol/contract.ImmutableState.md) +[ImmutableState](contracts/v4/reference/periphery/base/ImmutableState.md) Initializes a Uniswap v4 Pool diff --git a/docs/contracts/v4/reference/periphery/base/SafeCallback.md b/docs/contracts/v4/reference/periphery/base/SafeCallback.md index 171a569b2..b43628eb8 100644 --- a/docs/contracts/v4/reference/periphery/base/SafeCallback.md +++ b/docs/contracts/v4/reference/periphery/base/SafeCallback.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[ImmutableState](/src/base/ImmutableState.sol/contract.ImmutableState.md), IUnlockCallback +[ImmutableState](contracts/v4/reference/periphery/base/ImmutableState.md), IUnlockCallback A contract that only allows the Uniswap v4 PoolManager to call the unlockCallback diff --git a/docs/contracts/v4/reference/periphery/interfaces/IPositionManager.md b/docs/contracts/v4/reference/periphery/interfaces/IPositionManager.md index c816895e5..03643f6b5 100644 --- a/docs/contracts/v4/reference/periphery/interfaces/IPositionManager.md +++ b/docs/contracts/v4/reference/periphery/interfaces/IPositionManager.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[INotifier](/src/interfaces/INotifier.sol/interface.INotifier.md) +[INotifier](contracts/v4/reference/periphery/interfaces/INotifier.md) Interface for the PositionManager contract diff --git a/docs/contracts/v4/reference/periphery/lens/Quoter.md b/docs/contracts/v4/reference/periphery/lens/Quoter.md index e4c4e34f5..878442a4a 100644 --- a/docs/contracts/v4/reference/periphery/lens/Quoter.md +++ b/docs/contracts/v4/reference/periphery/lens/Quoter.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[IQuoter](/src/interfaces/IQuoter.sol/interface.IQuoter.md), [BaseV4Quoter](/src/base/BaseV4Quoter.sol/abstract.BaseV4Quoter.md) +[IQuoter](contracts/v4/reference/periphery/interfaces/IQuoter.md), [BaseV4Quoter](contracts/v4/reference/periphery/base/BaseV4Quoter.md) ## Functions diff --git a/docs/contracts/v4/reference/periphery/lens/StateView.md b/docs/contracts/v4/reference/periphery/lens/StateView.md index 63e286574..a3d1ba952 100644 --- a/docs/contracts/v4/reference/periphery/lens/StateView.md +++ b/docs/contracts/v4/reference/periphery/lens/StateView.md @@ -3,7 +3,7 @@ | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc) **Inherits:** -[ImmutableState](/src/base/ImmutableState.sol/contract.ImmutableState.md) +[ImmutableState](contracts/v4/reference/periphery/base/ImmutableState.md) A view only contract wrapping the StateLibrary.sol library for reading storage in v4-core. diff --git a/scripts/v4-forge-doc.sh b/scripts/v4-forge-doc.sh index 29fc23f9d..7e8741272 100755 --- a/scripts/v4-forge-doc.sh +++ b/scripts/v4-forge-doc.sh @@ -1,4 +1,10 @@ +# Usage: ./scripts/v4-forge-doc.sh, called from the root directory + # Find all the .md files in the source directory +# @dev assumes that v4-periphery and v4-core are in the parent directory +# i.e. /home/user/docs, /home/user/v4-periphery, /home/user/v4-core + +# Copy v4-periphery find ../v4-periphery/docs/src -type f -regex '.*\.sol/[^.]*\.[^.]*\.md' | while read file; do # Extract the directory part (e.g., base, base/hooks, libraries) dir_structure=$(echo "$file" | sed -r 's|.*/src/([^/]+)/.*\.sol/.*|\1|') @@ -23,5 +29,8 @@ find ../v4-periphery/docs/src -type f -regex '.*\.sol/[^.]*\.[^.]*\.md' | while # Add note: sed -i '3i | Generated with [forge doc](https://book.getfoundry.sh/reference/forge/forge-doc)' "$new_file" - # echo "Copied: $file -> $new_file" + # Replace relative path links within the file with full paths + sed -i 's|/src/\([^/]\+\)/\([^/]\+\)\.sol/\([^/]\+\)\.\([^/]\+\)\.md|contracts/v4/reference/periphery/\1/\2.md|g' "$new_file" + + echo "Copied: $file -> $new_file" done \ No newline at end of file