0

Is it possible to figure out before transaction is completed, how much CPU an action in a smart contract will use? E.G. I make transaction with X actions + call to my smart - contract. Is possible to know how much CPU prev. actions took?

1 Answer 1

0

You can only do a very rough estimation based on previous action-calls by using the Hyperion-History get_actions-endpoint. The data returned has

  "cpu_usage_us": ...
  "net_usage_words": ...
  "account_ram_deltas": ...

By using the data returned you could do estimates based on average values etc.but many other factors will play a role and cpu-usage is not 100% predictable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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