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

使用viem+wagmi,获取手续费,发起参数不全,导致不准确 #2507

Closed
1 task done
gxtgh opened this issue Jul 19, 2024 · 2 comments
Closed
1 task done

使用viem+wagmi,获取手续费,发起参数不全,导致不准确 #2507

gxtgh opened this issue Jul 19, 2024 · 2 comments
Labels
needs reproduction Misc: Needs Reproduction

Comments

@gxtgh
Copy link

gxtgh commented Jul 19, 2024

Check existing issues

Viem Version

2.17.5

Current Behavior

import { createPublicClient } from 'viem'
import { http } from 'wagmi';

let writeParam = {
abi: VOTE_POOL_ABI,
account: ‘0xdDbdaEb812E6090961bb87f983368502FCD902D3’,
address: ‘0x7F5418C0BB00d4CfB1c7C628B75A991d64A7fad2’,
functionName: 'addMargin',
value: ’0x4563918244f40000‘
}
const pulicCLient = createPublicClient({
chain: chain,
transport: http()
})
const gasLimit = await pulicCLient.estimateGas(writeParam);

发起estimateGas请求时,没有携带data和to参数,导致获取的gas不准确
{"jsonrpc":"2.0","id":7,"method":"eth_estimateGas","params":[{"from":"0xdDbdaEb812E6090961bb87f983368502FCD902D3","value":"0x4563918244f40000"}]}

Expected Behavior

{"jsonrpc":"2.0","id":7,"method":"eth_estimateGas","params":[{"from":"0xdDbdaEb812E6090961bb87f983368502FCD902D3","value":"0x4563918244f40000",to:"0x7F5418C0BB00d4CfB1c7C628B75A991d64A7fad2",data:"0x483a00e8"}]}

Steps To Reproduce

No response

Link to Minimal Reproducible Example

No response

Anything else?

No response

@jxom jxom added the needs reproduction Misc: Needs Reproduction label Jul 19, 2024
Copy link
Contributor

Hello @gxtgh.

Please provide a minimal reproduction using StackBlitz, TypeScript Playground (for type issues), or a separate minimal GitHub repository.

Minimal reproductions are required as they save us a lot of time reproducing your config/environment and issue, and allow us to help you faster.

Once a minimal reproduction is added, a team member will confirm it works, then re-open the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
Copy link
Contributor

github-actions bot commented Aug 3, 2024

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Viem version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs reproduction Misc: Needs Reproduction
Projects
None yet
Development

No branches or pull requests

2 participants