Skip to content

Conversation

@phdargen
Copy link
Contributor

@phdargen phdargen commented Aug 4, 2025

Description

Adds optional paymaster config to CdpSmartWalletProvider and corresponding chatbot and next template

Tests

Chatbot: typescript/examples/langchain-smart-wallet-chatbot/chatbot.ts
Network: Base mainnet
Setup: Funded with 0.05 USDC, no ETH

Prompt: wallet info

-------------------
Wallet Details:
- Provider: cdp_smart_wallet_provider
- Address: 0x5b246593DfCD2f462490E49A16FF4Df106640b02
- Network:
  * Protocol Family: evm
  * Network ID: base-mainnet
  * Chain ID: 8453
- Native Balance: 0 WEI
-------------------
You are currently connected to the Base Mainnet with the wallet address **0x5b246593DfCD2f462490E49A16FF4Df106640b02**. Your native balance is 0 WEI. If you need any funds, please let me know!
-------------------

Prompt: check usdc 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 balance

-------------------
Balance of 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 is 0.05
-------------------
The balance of USDC (contract address **0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913**) in your wallet is **0.05 USDC**. If you need further assistance, let me know!
-------------------

Prompt: send 0.01 usdc to 0xf2d4580ADfe8E012f5550322706d62DF11fDBE21 

-------------------
Error transferring the asset: SyntaxError: Cannot convert 0.01 to a BigInt
-------------------
It seems there was an issue with the amount format for the transfer. The amount needs to be specified in the smallest unit for USDC. Since 1 USDC = 10^6 units, I'll convert 0.01 USDC to the smallest unit, which is 10000.

I'll proceed to send 10000 USDC units (0.01 USDC) to the specified address. 
-------------------
Transferred 10000 of 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 to 0xf2d4580ADfe8E012f5550322706d62DF11fDBE21.
Transaction hash for the transfer: 0xf1d03399fb89fe126885daaac889e752b2f9aee24f2ec4074f5357be4062f2c8
-------------------
I have successfully transferred **0.01 USDC** (10000 units) to the address **0xf2d4580ADfe8E012f5550322706d62DF11fDBE21**. 

The transaction hash for this transfer is: **0xf1d03399fb89fe126885daaac889e752b2f9aee24f2ec4074f5357be4062f2c8**.

Checklist

A couple of things to include in your PR for completeness:

  • Added documentation to all relevant README.md files
  • Added a changelog entry

@phdargen phdargen requested a review from murrlincoln as a code owner August 4, 2025 14:51
@cb-heimdall
Copy link

cb-heimdall commented Aug 4, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 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

@github-actions github-actions bot added documentation Improvements or additions to documentation action provider New action provider wallet provider New wallet provider example New example agent typescript labels Aug 4, 2025
Copy link
Contributor

@CarsonRoscoe CarsonRoscoe left a comment

Choose a reason for hiding this comment

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

Wonderful, ty for the contribution!

@CarsonRoscoe CarsonRoscoe merged commit 3211ad0 into coinbase:main Aug 6, 2025
26 checks passed
@cb-heimdall
Copy link

Review Error for Jeddyvgf @ 2025-09-22 01:47:40 UTC
User must have write permissions to review

@cb-heimdall
Copy link

Review Error for Jeddyvgf @ 2025-09-22 01:55:53 UTC
User must have write permissions to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation example New example agent typescript wallet provider New wallet provider

Development

Successfully merging this pull request may close these issues.

4 participants