How do I make sure that only users and smart contracts can call one function per transaction?

Say I have two functions:

function foo() {}
function bar() {}

It's ok to call each function in isolation, but calling both functions in the same transaction leads to an exploit. So in a given transaction only one of those functions at most can be called.

Your Answer

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

Browse other questions tagged or ask your own question.