Skip to content

Commit

Permalink
docs(world/batch-calls): add the advantage vs multicall (#2266)
Browse files Browse the repository at this point in the history
  • Loading branch information
qbzzt authored Feb 15, 2024
1 parent f790d23 commit a24cf08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/pages/world/batch-calls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ If you have the proper [delegations](/world/account-delegation), you can also us

The calls take place sequentially, and after they all finish successfully you get back the return values from all of them.
If any of the calls revert, so does `batchCall` / `batchCallFrom`, so all the state changes created by the previous calls are discarded.

The advantage of using `batchCall` rather than [the standard multicall](https://github.com/mds1/multicall) is that `batchCall` is a native MUD function that lives in the `World` contract, so it does not change `msg.sender`.
As a result, when you use `batchCall` MUD can apply [access control](./namespaces-access-control), and `System`s can rely on the value of [`_msgSender()`](./systems#writing-systems).

0 comments on commit a24cf08

Please sign in to comment.