Skip to content

fix: cast send ignores --zk-gas-per-pubdata flag #1274

@tomimor

Description

@tomimor

Description

cast send ignores the --zk-gas-per-pubdata CLI flag when estimating fees for ZkSync transactions.

In crates/cast/src/cmd/send/zksync.rs, send_transaction_internal passes None to estimate_fee instead of zk_tx_opts.gas_per_pubdata:

foundry_zksync_core::estimate_fee(&mut tx, &zk_provider, 130, None).await?;

The CLI flag is parsed and available in scope (zk_tx_opts.gas_per_pubdata) but never wired through.

Fix

Replace None with zk_tx_opts.gas_per_pubdata:

foundry_zksync_core::estimate_fee(&mut tx, &zk_provider, 130, zk_tx_opts.gas_per_pubdata).await?;

Related

cast mktx (crates/cast/src/cmd/mktx/zksync.rs) has a similar gap: it calls ZksyncProvider::estimate_fee directly instead of foundry_zksync_core::estimate_fee, so gas_per_pubdata is never set — neither from the CLI flag nor from the estimate response.

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions