Skip to content

getPoolCoinByHash function not working ? #526

@AbhinavMV

Description

@AbhinavMV

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

Image

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions