DOCUMENTATION

import SigDescription from "./sig-descriptionx"; import TxValueOption from "../../reference/common/tx-value-optionx"; import RpcOptions from "../../reference/common/rpc-optionsx"; import EtherscanOptions from "../../reference/common/etherscan-optionsx"; import CommonOptions from "./common-optionsx";

cast estimate


NAME

cast-estimate - Estimate the gas cost of a transaction.

SYNOPSIS

cast estimate [options] to sig [args...]

DESCRIPTION

Estimate the gas cost of a transaction.

The destination (to) can be an ENS name or an address.

<SigDescription />

OPTIONS

Transaction Options

<TxValueOption /> <RpcOptions /> <EtherscanOptions /> <CommonOptions />

EXAMPLES

  1. Estimate the gas cost of calling deposit() on the WETH contract:
    cast estimate 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 \
      --value 0.1ether "deposit()"
    

SEE ALSO

cast, cast send, cast publish, cast receipt