Skip to content

Commit abdc231

Browse files
ernestognwAmxx
andauthored
Update contracts/utils/SimulateCall.sol
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent b0b5795 commit abdc231

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

contracts/utils/SimulateCall.sol

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
pragma solidity ^0.8.20;
44

55
/**
6-
* @dev Library for simulating external calls through dynamically deployed simulator contracts that revert with
7-
* the return data, allowing inspection of call results without state changes.
6+
* @dev Library for simulating external calls and inspecting the result of the call while reverting any state changes
7+
* of events the call may have produced.
88
*
9-
* This pattern is useful when you need to simulate the result of a call without actually executing it on-chain,
10-
* or when you need to isolate the caller's address from the target contract.
9+
* This pattern is useful when you need to simulate the result of a call without actually executing it on-chain. Since
10+
* the addess of the sender is preserved, this supports simulating calls that perform token swap that use the caller's
11+
* balance, or any operation that is restricted to the caller.
1112
*/
1213
library SimulateCall {
1314
/// @dev Simulates a call to the target contract through a dynamically deployed simulator.

0 commit comments

Comments
 (0)