When using OpenZeppelin's SafeMath library, what's the execution order when we do something like this?

v = v1.add(v2).mul(v3)

Is it (v1 + v2) * v3 or v1 + v2 * v3?


1 Answer 1


It's left to right.

v1.add(v2) => .mul(v3)

Hope it helps.

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.