Taquito TypeDocs
    Preparing search index...

    Interface EstimationProvider

    Public estimation API used by TezosToolkit.estimate.

    Estimation is simulation-based: Taquito prepares an unsigned operation, simulates it on the current head, and derives recommended limits/fees from the simulation result.

    Returned values are best-effort recommendations for the current chain state and mempool conditions. They are not an inclusion guarantee.

    interface EstimationProvider {
        batch(params: ParamsWithKind[]): Promise<Estimate[]>;
        contractCall(
            contractMethod: ContractMethodObject<ContractProvider>,
        ): Promise<Estimate>;
        finalizeUnstake(params: FinalizeUnstakeParams): Promise<Estimate>;
        increasePaidStorage(params: IncreasePaidStorageParams): Promise<Estimate>;
        originate(params: OriginateParams): Promise<Estimate>;
        registerDelegate(params?: RegisterDelegateParams): Promise<Estimate>;
        registerGlobalConstant(
            params: RegisterGlobalConstantParams,
        ): Promise<Estimate>;
        reveal(params?: RevealParams): Promise<Estimate | undefined>;
        setDelegate(params: DelegateParams): Promise<Estimate>;
        smartRollupAddMessages(
            params: SmartRollupAddMessagesParams,
        ): Promise<Estimate>;
        smartRollupExecuteOutboxMessage(
            params: SmartRollupExecuteOutboxMessageParams,
        ): Promise<Estimate>;
        smartRollupOriginate(params: SmartRollupOriginateParams): Promise<Estimate>;
        stake(params: StakeParams): Promise<Estimate>;
        transfer(params: TransferParams): Promise<Estimate>;
        transferTicket(params: TransferTicketParams): Promise<Estimate>;
        unstake(params: UnstakeParams): Promise<Estimate>;
        updateCompanionKey(params: UpdateCompanionKeyParams): Promise<Estimate>;
        updateConsensusKey(params: UpdateConsensusKeyParams): Promise<Estimate>;
    }

    Implemented by

    Index

    Methods

    • Estimate gas/storage/fee for each operation in a manager-operation batch.

      If a reveal is needed, its estimate is returned as the first element.

      For operations missing an explicit gasLimit, Taquito patches simulation gas using protocol constants and block gas budget:

      • count only ops that need gas patching
      • subtract already-explicit gas from the block budget
      • reserve reveal gas when reveal will be prepended
      • divide remaining block gas across ops that need patching

      Parameters

      Returns Promise<Estimate[]>

      Per-operation estimates in simulation order.