Skip to content

Commit

Permalink
fix referencing
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Sep 26, 2024
1 parent d9e9a65 commit 1df81bc
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/PositionManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/V4Router.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/base/BaseHook.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/base/BaseV4Quoter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/base/EIP712_v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/base/Multicall_v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/base/Notifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/base/SafeCallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/lens/Quoter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v4/reference/periphery/lens/StateView.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
11 changes: 10 additions & 1 deletion scripts/v4-forge-doc.sh
Original file line number Diff line number Diff line change
@@ -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|')
Expand All @@ -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

0 comments on commit 1df81bc

Please sign in to comment.