-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
Requirement
i want to use a node call to get pool key information like currency0, currency1, fee, tickSpacing, hook information using pool id hash
Problem
the method getPoolCoinByHash provided on the hook contract on base chain (0xd61A675F8a0c67A73DC3B54FB7318B4D91409040) does not work ❌
Steps to reproduce
- this is valid poolHash on zora
0x93e1d72304ac86343afdb5ad346ce2d1cd9fae8d05e518a3f50259f1cb803932, it was initialized in the transaction https://basescan.org/tx/0xa0030e458d4bf4ca161499215737fc9c1f729474aa61366ae5e5e5072e97c931#eventlog#92 - this method requires bytes23 input, converting the poolIdHash to bytes23 gives
0x93e1d72304ac86343afdb5ad346ce2d1cd9fae8d05e518 - And when i call the function with this input it returns the zero address https://basescan.org/address/0xd61A675F8a0c67A73DC3B54FB7318B4D91409040#readContract
Some Findings
- Since Zora uses hooks to integrate with unsiwapv4, the poolKeys function on uniswapV4 state view contract does not work
/// @notice Mapping of pool keys to coins.
mapping(bytes32 => IZoraV4CoinHook.PoolCoin) internal poolCoins;
/// @inheritdoc IZoraV4CoinHook
function getPoolCoinByHash(bytes23 poolKeyHash) external view returns (IZoraV4CoinHook.PoolCoin memory) {
return poolCoins[poolKeyHash];
}
- i checked the code on BaseZoraV4CoinHook.sol, in above code taken from the contract if you see, the key of the map (poolCoins) is of type bytes32 but in the function the input is of bytes23, is that a typo or something ? (Have little knowledge about solidity, so sorry if this dumb question 😅)
Could someone please help understand what i am doing wrong ? 🤔
Metadata
Metadata
Assignees
Labels
No labels