CBSA practice question 4 of 30

When writing and considering push and pull in a smart contract that involves "user" funds would it be better to ____________________?

Full set: 229 questions
Answer options
A: Withdraw funds rather than pull funds to them automatically
B: Withdraw funds rather than push funds to them automatically Correct answer
C: Pull funds rather than push funds to them automatically
D: Push funds rather than pull funds to them automatically
Correct Answer:
B. Withdraw funds rather than push funds to them automatically
Explanation

Withdraw funds rather than push funds to them automatically Favor pull over push for external calls as we've seen, external calls can fail for a number of reasons, including external errors. To minimize the damage caused by such failures, it is often better to isolate each external call into its own transaction that can be initiated by the recipient of the call. This is especially relevant for payments, where it is better to let users withdraw funds rather than push funds to them automatically. (This also reduces the chance of problems with the gas limit.)

Scroll to Top