1

How much worse would it be to call an entry point 100x vs calling a bulk operation entry point with a list[0-99] 1x?

1 Answer 1

1

Short answer is : too much.

10000 gas per call minimum https://gitlab.com/morley-framework/morley/-/blob/1f4ad392173a49752f1326a9dd4a4d5b7f6c5e70/docs/gasConsumption.md with a limit per transaction around 1000000.

EDIT: after precision by Raphael, the minimal cost is 1000 gas and not 10000 as it used to be the case. It means 100 iterations are sometimes possible but it doesn’t change the general point: don’t do it in general, it’s still very expensive.

2
  • This was 10000 gas units when this document was written but since then it has been divided by 10 during the Delphi upgrade. This change significantly increased the max number of inter-contract calls, see research-development.nomadic-labs.com/…. That being said, I agree with the short answer, the overhead is significant so if you can iterate over a list instead it will very likely consume much less gas. Jan 3 at 7:30
  • Thank you for the precision!
    – FFF
    Jan 4 at 1:04

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.