-
Notifications
You must be signed in to change notification settings - Fork 3.9k
cannot estimateGas on ETH value sends #930
Copy link
Copy link
Closed
Labels
C-bugCategory: bugsCategory: bugsS-unconfirmedStatus: Issue might be valid, but it’s not yet confirmedStatus: Issue might be valid, but it’s not yet confirmed
Description
Describe the bug
When sending eth value, we want users to estimateGas to get the encoded gasLimit to send their tx with. However, we currently do not allow calling estimateGas with no data:
optimism/l2geth/internal/ethapi/api.go
Lines 1024 to 1026 in 8d67991
| if args.Data == nil { | |
| return 0, errors.New("transaction data cannot be nil") | |
| } |
To Reproduce
Try calling estimateGas with no calldata.
Expected behavior
We can call estimateGas when sending a transaction with ETH value
Additional Context
It's unclear whether this integration test will set the gasLimit to 21,000 by default or if it does call estimateGas
optimism/integration-tests/test/rpc.spec.ts
Line 102 in dcb538d
| const result = await env.l2Wallet.sendTransaction(tx) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: bugsCategory: bugsS-unconfirmedStatus: Issue might be valid, but it’s not yet confirmedStatus: Issue might be valid, but it’s not yet confirmed