degenbot.uniswap.v3_functions ============================= .. py:module:: degenbot.uniswap.v3_functions .. autoapi-nested-parse:: Uniswap V3 swap and burn amount calculations. Module Contents --------------- .. py:function:: exchange_rate_from_sqrt_price_x96(sqrt_price_x96: int) -> fractions.Fraction Exchange rate from sqrt price x96. :returns: The exchange rate as a Fraction. .. py:function:: generate_v3_pool_address(deployer_address: str | bytes, token_addresses: collections.abc.Iterable[str | bytes], fee: degenbot.uniswap.v3_types.Pip, init_hash: str | bytes) -> degenbot.types.chain.ChecksummedAddress Get the deterministic V3 pool address generated by CREATE2. Uses the token address and fee to generate the salt. The token addresses can be passed in any order. :returns: The checksummed pool address. Adapted from https://github.com/Uniswap/v3-periphery/blob/0682387198a24c7cd63566a2c58398533860a5d1/contracts/libraries/PoolAddress.sol#L33