Examples of use :

Estimate a transfer operation :

// Assuming that provider and signer are already configured...

const amount = 2;
const address = 'tz1h3rQ8wBxFd8L9B3d7Jhaawu6Z568XU3xY';

// Estimate gasLimit, storageLimit and fees for a transfer operation
const est = await Tezos.estimate.transfer({ to: address, amount: amount })
console.log(est.burnFeeMutez, est.gasLimit, est.minimalFeeMutez, est.storageLimit,
est.suggestedFeeMutez, est.totalCost, est.usingBaseFeeMutez)

Estimate a contract origination :

// generic.json is referring to a Michelson Smart Contract

const genericMultisigJSON = require('./generic.json')
const est = await Tezos.estimate.originate({
code: genericMultisigJSON,
storage: {
stored_counter: 0,
threshold: 1,
keys: ['edpkuLxx9PQD8fZ45eUzrK3BhfDZJHhBuK4Zi49DcEGANwd2rpX82t']
}
})
console.log(est.burnFeeMutez, est.gasLimit, est.minimalFeeMutez, est.storageLimit,
est.suggestedFeeMutez, est.totalCost, est.usingBaseFeeMutez)

Constructors

  • Parameters

    • _milligasLimit: string | number
    • _storageLimit: string | number
    • opSize: string | number
    • minimalFeePerStorageByteMutez: string | number
    • baseFeeMutez: string | number = MINIMAL_FEE_MUTEZ

      Description

      Base fee in mutez (1 mutez = 1e10−6 tez)

    Returns Estimate

Properties

opSize: string | number

Accessors

  • get consumedMilligas(): number
  • Returns number

    Description

    Since Delphinet, consumed gas is provided in milligas for more precision. This function returns an estimation of the gas that operation will consume in milligas.

Methods

Generated using TypeDoc