4

I would like to find out if the smart contract's code size/storage or an operation's parameters helps to derive to the cost.

Is there a formula to calculate the cost of the operation to be invoking a smart contract? How does it derive to this value on estimate transfer using taquito, which is pretty expensive for an operation.

{
  burnFeeMutez: 0,
  minimalFeeMutez: 23843,
  suggestedFeeMutez: 23943,
  usingBaseFeeMutez: 23843,
  totalCost: 23843
}
  • I'm not sure if you are asking if Taquito can help with estimating, or how Taquito estimates. You can use Taquitos Tezos.estimate.transfer API to estimate the call to a smart transfer. Taquito will query the Tezos Nodes estimate RPC. – Jev Björsell Mar 4 at 23:37
3

There is no formula that will give you the full cost and gas usage of smart contract invocation. The best method is to simulate. Contract code size and storage directly affects costs through storage burn. Parameter size indirectly affect fees through gas size.

See:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.