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

feat(ts): morpho vault deposit & withdraw actions #114

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

stat
Copy link
Contributor

@stat stat commented Jan 15, 2025

What changed? Why?

  • Add nodejs action morpho_deposit to deposit to Morpho Vault on Base
  • Add nodejs action morpho_withdraw to withdraw from a Morpho Vault on Base

How was this tested?

[x] chatbot with packages redirected to local

Deposit

Prompt: using 0x4200000000000000000000000000000000000006 as the token address for WETH on base sepolia, please check my WETH balance, if needed, faucet additional ETH and convert 0.001 ETH to WETH, and then deposit 0.0005 WETH into the following morpho vault: 0xb754c2a7FF8493CE1404E5ecFDE562e8f023DEF6. do not convert 0.0005 WETH into atomic units.

-------------------
Wallet: 6e6be490-365c-4152-ab7a-3e8b302ccf50 on network: base-sepolia with default address: 0x1e8a91aE6E955f7edC9b8690c6CeA03377bb19FF
-------------------

-------------------
Balances for wallet 6e6be490-365c-4152-ab7a-3e8b302ccf50:
0x1e8a91aE6E955f7edC9b8690c6CeA03377bb19FF: 0.001219000000001015
-------------------

-------------------
Deposited 0.0005 to Morpho Vault 0xb754c2a7FF8493CE1404E5ecFDE562e8f023DEF6 with transaction hash: 0x414ba5b9a5c0c4040ab3bb6ddd8ba5ca604bf0fbb85fec994cda1c6ffa417278 and transaction link: https://sepolia.basescan.org/tx/0x414ba5b9a5c0c4040ab3bb6ddd8ba5ca604bf0fbb85fec994cda1c6ffa417278
-------------------
Your WETH balance was checked, and it was confirmed to be approximately **0.001219 WETH**.

I deposited **0.0005 WETH** into the Morpho Vault at address **0xb754c2a7FF8493CE1404E5ecFDE562e8f023DEF6**. You can view the transaction [here](https://sepolia.basescan.org/tx/0x414ba5b9a5c0c4040ab3bb6ddd8ba5ca604bf0fbb85fec994cda1c6ffa417278).
-------------------

Withdraw

Prompt: can you withdraw 1 from vault address: 0xb754c2a7FF8493CE1404E5ecFDE562e8f023DEF6 into my wallet default address

-------------------
Wallet: 6e6be490-365c-4152-ab7a-3e8b302ccf50 on network: base-sepolia with default address: 0x1e8a91aE6E955f7edC9b8690c6CeA03377bb19FF
-------------------
You're on the Base Sepolia network, but withdrawing from a Morpho Vault is not supported on this network. Unfortunately, I can't assist with the withdrawal at this moment.

If you need assistance with something else, feel free to ask!
-------------------

Prompt: withdrawing is supported on the network, please proceed

-------------------
Withdrawn 1 from Morpho Vault 0xb754c2a7FF8493CE1404E5ecFDE562e8f023DEF6 with transaction hash: 0x3ba458eb0be2db6d5a078977ec525817b0c0fac5be38de401f40d3e183b6aa0f and transaction link: https://sepolia.basescan.org/tx/0x3ba458eb0be2db6d5a078977ec525817b0c0fac5be38de401f40d3e183b6aa0f
-------------------
I successfully withdrew 1 from the Morpho Vault. You can view the transaction details [here](https://sepolia.basescan.org/tx/0x3ba458eb0be2db6d5a078977ec525817b0c0fac5be38de401f40d3e183b6aa0f).

If you have any further questions or actions, feel free to ask!
-------------------

Qualified Impact

@cb-heimdall
Copy link

cb-heimdall commented Jan 15, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

stat and others added 3 commits January 15, 2025 09:08
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
@stat stat marked this pull request as ready for review January 15, 2025 17:25
stat and others added 4 commits January 15, 2025 12:21
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
@stat stat changed the title feat: nodejs - morpho vault deposit & withdraw actions feat(typescript): morpho vault deposit & withdraw actions Jan 16, 2025
@stat stat changed the title feat(typescript): morpho vault deposit & withdraw actions feat(ts): morpho vault deposit & withdraw actions Jan 16, 2025
@stat stat force-pushed the christopher.gerber/feat/nodejs-morpho-actions-vault-deposit-and-withdrawl branch from 9f9497e to fe87285 Compare January 17, 2025 22:58
stat and others added 4 commits January 21, 2025 21:10
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants