question: how can i get encoded data with using useWriteContract #142
Replies: 12 comments 4 replies
-
actually, instead of encoding data, better to change config inside wagmi client to change RPC url to tenderly one. how can i do this on runtime? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I didn't understand your question. Can you provide some use cases? I think it's easier to understand based on the code. |
Beta Was this translation helpful? Give feedback.
-
As for this, you can modify it when creating wagmi |
Beta Was this translation helpful? Give feedback.
-
hey @unicape , thanks for the reply. dynamically changing only the RPC URL is not resolving for me because i needed to stay user's old connection (metamask) and sent all write/read operations through the tenderly connector (mock) while simulation mode one. if the only RPC URL changing, the write operations still going to metamask. if I conditionally set while initialize, the user can lost connection I believe. I built this but still need better approach. what do you thinking? |
Beta Was this translation helpful? Give feedback.
-
on |
Beta Was this translation helpful? Give feedback.
-
Do you want to use the Metamask connector when users connect and use other connectors when writing/reading? |
Beta Was this translation helpful? Give feedback.
-
actually i want to use another |
Beta Was this translation helpful? Give feedback.
-
I want to know why not customize RPC in plugin |
Beta Was this translation helpful? Give feedback.
-
something like this const config = createConfig({
chains: [mainnet],
connectors: [
metamask()
],
transports: {
[mainnet.id]: http(
'https://rpc.tenderly.co/fork/YOUR_APIKEY',
),
},
})
Vue.use(UseWagmiPlugin, { config }) |
Beta Was this translation helpful? Give feedback.
-
when i do this, write operations still going metamask client and still asking for a signature :) |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is what you want https://wagmi.sh/react/api/transports/unstable_connector |
Beta Was this translation helpful? Give feedback.
-
I saw your question in the wagmi community. If you don't get a timely reply, you can try https://discord.com/invite/9zHPXuBpqy |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
Package Version
1.1.0
Current Behavior
Hey, thank you for great wrapper of wagmi hooks!
I have a question about usage about
useWriteContract
. currently usage of quite usefull, however i want to use tenderly to simulation mode, so i need to get encoded data somehow, is there any way to achieve with current API's?Thanks again!
Expected Behavior
No response
Steps To Reproduce
No response
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions