Skip to content

cannot estimateGas on ETH value sends  #930

@K-Ho

Description

@K-Ho

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:

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

const result = await env.l2Wallet.sendTransaction(tx)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugsS-unconfirmedStatus: Issue might be valid, but it’s not yet confirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions