You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I'm using Turnkey with Viem and running into an issue when trying to call writeContract. I suspect it's an error with Turnkey and not Viem because I am able to use Viem's privateKeyToAccount to successfully call writeContract.
Here's the part of the TypeScript script that I have that's throwing the error:
[Uncaught Error]: err.walk is not a function
TypeError: err.walk is not a function
at getNodeError (/Users/davidlee/dev/peregrine/stable/packages/scripts/node_modules/viem/utils/errors/getNodeError.ts:36:38)
at getTransactionError (/Users/davidlee/dev/peregrine/stable/packages/scripts/node_modules/viem/utils/errors/getTransactionError.ts:23:27)
at sendTransaction (/Users/davidlee/dev/peregrine/stable/packages/scripts/node_modules/viem/actions/wallet/sendTransaction.ts:185:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async writeContract (/Users/davidlee/dev/peregrine/stable/packages/scripts/node_modules/viem/actions/wallet/writeContract.ts:133:16)
at async processCommand (/Users/davidlee/dev/peregrine/stable/packages/scripts/src/mint-usdlr.ts:83:16)
Glad you were able to find a fix. It looks like the viem API was swallowing the errors because they expect a specific error: BaseError with a method walk(). Will see if there's anything we can do on our side to improve this UX
Hi all, I'm using Turnkey with Viem and running into an issue when trying to call
writeContract
. I suspect it's an error with Turnkey and not Viem because I am able to use Viem'sprivateKeyToAccount
to successfully callwriteContract
.Here's the part of the TypeScript script that I have that's throwing the error:
Stack trace:
Dependency versions:
Let me know if I should add any other information!
The text was updated successfully, but these errors were encountered: