For the complete documentation index, see llms.txt. This page is also available as Markdown.

PoolMetadataLib

Git Source

Title: PoolMetadataLib

Library for handling pool metadata and computing pool identifiers

Functions

computeOnchainId

Computes the onchain ID for a pool based on its components

function computeOnchainId(address token0, address token1, uint24 fee) internal pure returns (bytes32);

Parameters

Name
Type
Description

token0

address

First token address (must be sorted)

token1

address

Second token address (must be sorted)

fee

uint24

Fee tier for the pool

Returns

Name
Type
Description

<none>

bytes32

The keccak256 hash of the encoded token addresses and fee

computeOnchainId

Computes the onchain ID for a pool based on its metadata

function computeOnchainId(PoolMetadata memory metadata) internal pure returns (bytes32);

Parameters

Name
Type
Description

metadata

PoolMetadata

The pool metadata

Returns

Name
Type
Description

<none>

bytes32

The keccak256 hash of the encoded token addresses and fee

Last updated

Was this helpful?