CallEstimate
CallEstimate includes both the call cost and the optional size of the call result.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CallEstimate(
min,max,ResultSize?):CallEstimate
Parameters
Section titled “Parameters”bigint
bigint
ResultSize?
Section titled “ResultSize?”Returns
Section titled “Returns”CallEstimate
Overrides
Section titled “Overrides”Properties
Section titled “Properties”
readonlyMax:bigint
Inherited from
Section titled “Inherited from”
readonlyMin:bigint
Inherited from
Section titled “Inherited from”ResultSize?
Section titled “ResultSize?”
readonlyoptionalResultSize?:SizeEstimate
Methods
Section titled “Methods”add(
other):CostEstimate
add returns the sum of two cost ranges with uint64 overflow protection.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”multiply()
Section titled “multiply()”multiply(
other):CostEstimate
multiply returns the product of two cost ranges with uint64 overflow protection.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”multiplyByCostFactor()
Section titled “multiplyByCostFactor()”multiplyByCostFactor(
costPerUnit):CostEstimate
multiplyByCostFactor scales a cost range and rounds each bound up.
Parameters
Section titled “Parameters”costPerUnit
Section titled “costPerUnit”number
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”CostEstimate.multiplyByCostFactor
union()
Section titled “union()”union(
other):CostEstimate
union returns the smallest estimate that covers both ranges.