Skip to content

Refactor replace quote base#56

Merged
gkoch78 merged 15 commits intomainfrom
refactor-replace-quote-base
Feb 10, 2025
Merged

Refactor replace quote base#56
gkoch78 merged 15 commits intomainfrom
refactor-replace-quote-base

Conversation

@gkoch78
Copy link
Contributor

@gkoch78 gkoch78 commented Feb 8, 2025

Replace quote and base token in favor of token_in and token_out

@gkoch78 gkoch78 marked this pull request as ready for review February 10, 2025 17:42
Copy link
Contributor

@aflament aflament left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with comments

@@ -13,4 +13,4 @@ def test_get_token_price(default_config: Config) -> None:
sol = tokens_config["SOL"]

price = client.get_token_price(giga, sol)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to have a way to call this function like: client.get_price(giga).in(sol)

@@ -97,9 +98,9 @@ def test_swap_eth_sepolia(eth_sepolia_client: UniswapClientV3) -> None:
pool = eth_sepolia_client._get_pool(usdc, weth)
print(f"find pool {pool.address}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
print(f"find pool {pool.address}")
assert pool is not None
print(f"find pool {pool.address}")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the pool were not found, an exception is raised

gkoch78 and others added 10 commits February 10, 2025 11:25
Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
…nt_v3.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
@gkoch78 gkoch78 merged commit 18ce2bd into main Feb 10, 2025
2 checks passed
@gkoch78 gkoch78 deleted the refactor-replace-quote-base branch February 10, 2025 19:36
ethancjackson added a commit that referenced this pull request Feb 12, 2025
* Add new API endpoint for AlchemyClient (#54)

alchemy_getAssetTransfers

* Update ruff and mypi (#55)

* README improvements (#52)

* Improvements to README

* improved prompt for token price tool (#57)

* Fix LLMFunction caching test (#58)

* Refactor replace quote base (#56)

* token_in and token_out for quote

* replace base and quote in swap

* clean up

* fix IT

* Update alphaswarm/services/exchanges/base.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Update alphaswarm/services/exchanges/base.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Update alphaswarm/services/exchanges/uniswap/uniswap_client_base.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Update alphaswarm/services/exchanges/uniswap/uniswap_client_v2.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Update alphaswarm/services/exchanges/uniswap/uniswap_client_v3.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Update alphaswarm/tools/exchanges/get_token_price_tool.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Update tests/integration/services/exchanges/uniswap/test_uniswap_client_v3.py

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Update uniswap_client_base.py

* clean up

---------

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>

* Feature modify PriceTool with token address (#60)

* Use contract address for token price tool

* Update description

* Doctring typo

* [Portfolio] Add support to `alchemy_getTokenBalances` (#61)

* [Portfolio] Add support to `alchemy_getTokenBalances`

* Update test_alchemy_client.py

* Add UT

* Update test_alchemy.py

* Refactor tools to use token address (#62)

* add `GetTokenAddress` tool

* Update terminal.py

* token addresses for get_token_price and dex quote

* swap tool to use token address

* revert services to use TokenInfo

* Update test_get_token_address.py

* lint

* Update test_web3_client.py

* lint

* fix (#63)

* Feature readme improvements (#59)

* Add links & notes

* Add docstring to AlphaSwarmAgent

* Updates for usage

* Return model_id parameter for clarity

* Organize examples/ and more instructions into separate README.md

* Address comments

* Example script modifications (#65)

* Update telegram_bot.py

* Update telegram_bot.py

* Update telegram_bot.py

* Update telegram_bot.py

* Update telegram_bot.py

* Update telegram_bot.py

* Update telegram_bot.py

---------

Co-authored-by: Arnaud Flament <arnaud.flament@gmail.com>

* add retries for some EVM functions (#66)

* add retries for some EVM functions

* add retry delay

* refactor and more test related to PR-66 (#68)

* refactor and add more tests on EVMClient

* lint

* Update .env.example

* Update python.yaml

* Update test_evm_client.py

---------

Co-authored-by: Arnaud Flament <17051690+aflament@users.noreply.github.com>
Co-authored-by: david <dvdmllr@outlook.com>
Co-authored-by: Nikolaiev Dmytro <nikolaevdmitryprog@gmail.com>
Co-authored-by: Guillaume Koch <39165367+gkoch78@users.noreply.github.com>
Co-authored-by: dan-kur <95598696+dan-kur@users.noreply.github.com>
Co-authored-by: PM <70244162+pandaring2you@users.noreply.github.com>
Co-authored-by: Arnaud Flament <arnaud.flament@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants