Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions for getting uniswap v3 pool contract address, liquidity, slot0 data, and observation data #21

Merged
merged 10 commits into from
Nov 7, 2024
1 change: 1 addition & 0 deletions cdp-agentkit-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Added

- Added `uniswap_v3_create_pool` action.
- Added `uniswap_v3_get_pool`, `uniswap_v3_get_pool_observe`, `uniswap_v3_get_pool_slot0`, and `uniswap_v3_get_pool_liquidity` actions.

## [0.0.1] - 2024-11-04

Expand Down
10 changes: 10 additions & 0 deletions cdp-agentkit-core/cdp_agentkit_core/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
from cdp_agentkit_core.actions.trade import TradeAction
from cdp_agentkit_core.actions.transfer import TransferAction
from cdp_agentkit_core.actions.uniswap_v3.create_pool import UniswapV3CreatePoolAction
from cdp_agentkit_core.actions.uniswap_v3.get_pool import UniswapV3GetPoolAction
from cdp_agentkit_core.actions.uniswap_v3.get_pool_liquidity import UniswapV3GetPoolLiquidityAction
from cdp_agentkit_core.actions.uniswap_v3.get_pool_observe import UniswapV3GetPoolObserveAction
from cdp_agentkit_core.actions.uniswap_v3.get_pool_slot0 import UniswapV3GetPoolSlot0Action


# WARNING: All new CdpAction subclasses must be imported above, otherwise they will not be discovered
# by get_all_cdp_actions(). The import ensures the class is registered as a subclass of CdpAction.
def get_all_cdp_actions() -> list[type[CdpAction]]:
"""Retrieve all subclasses of CdpAction defined in the package."""
actions = []
Expand All @@ -33,5 +39,9 @@ def get_all_cdp_actions() -> list[type[CdpAction]]:
"TradeAction",
"TransferAction",
"UniswapV3CreatePoolAction",
"UniswapV3GetPoolAction",
"UniswapV3GetPoolSlot0Action",
"UniswapV3GetPoolObserveAction",
"UniswapV3GetPoolLiquidityAction",
"CDP_ACTIONS",
]
Loading
Loading