-
Notifications
You must be signed in to change notification settings - Fork 287
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
feat: Added Compound Finance Python Actions #248
base: master
Are you sure you want to change the base?
Conversation
🟡 Heimdall Review Status
|
b691818
to
80aadcb
Compare
Sample Conversation with Prototyped ReAct Agent. You can find the example code for this on a separate branch in my fork: https://github.com/mikeghen/agentkit/tree/compound-chatbot/python/examples/compound-finance-chatbot Wraps ETH to WETH
Supplies WETH to Compound
Borrows USDC from Compound
Gets Its Compound Portfolio Details
Repays USDC to Compound
Withdraws USDC from Compound
Unwraps WETH to ETH
|
@mikeghen PR generally LGTM! - Please fix breaking tests and we can merge. It looks like the integration test initialization is running in the GHA which is incorrect. |
2e3c2b0
to
8bf5115
Compare
Adds Compound Finance actions get portfolio details, supply, borrow, repay, and withdraw. Includes unit and integration (with CDP) tests for the actions. Utility functions are added to make getting borrow, supply, and health details easily accessible.
8bf5115
to
67c2c05
Compare
Thanks for your review, @John-peterson-coinbase! I just made the change to fix the unit test failure, and this time I tested the actions on my fork on Github so verify they worked first. Let me know if you'd like to see anymore changes. |
Hey @mikeghen, thank you for your patience here. This PR looks amazing! We're releasing Python 0.1.0 very soon (targeting end of day today) which includes a new pattern for writing actions. Once that lands, let's rebase this PR and update the actions to the new pattern. Here's an example showcasing how we migrated the |
BTW @mikeghen great work on the integration test. I think it's reasonable to add a GitHub action with secrets configured in the repo settings. For this, we will need to update the test to accept either a JSON file, or API key name & secret which we can safely store in the repo settings. If you add the action and update the test, I can add the keys. If ok, let's use:
|
Thanks @0xRAG and @John-peterson-coinbase for your attention on this PR! Yes, I can revise my actions to use that new action provider pattern in v0.1.0. And, I can add the action as well for |
What changed? Why?
Adds Compound Finance actions get portfolio details, supply, borrow, repay, and withdraw. Includes unit and integration (with CDP) tests for the actions. Utility functions are added to make getting borrow, supply, and health details easily accessible.
Qualified Impact
Wrap and Unwrap ETH Action Changes
unwrap_eth
action.wrap/unwrap_eth
actions intoactions/weth
directory, created a constants file for weth.Integration Test
test_compound_integration.py
, that executes all the actions against Base Sepolia network to verify they work.integration
pytest marker and adds-m "not integration"
marker flag on unit tests run in theMakefile
and in the.github/workflows
.make test-integration
to test integration tests using the-m "integration"
flag.deselected