You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,4 @@
1
1
# Setup Helpers
2
-
-[ActorManager](#actormanager)
3
-
-[AssetManager](#assetmanager)
4
-
-[Utils](#utils)
5
-
-[Panic](#panic)
6
-
-[MockERC20](#mockerc20)
7
-
8
2
These contracts were created with the intention of speeding up the setup process for an invariant testing suite.
9
3
10
4
For an example implementation of these contracts in use see the [create-chimera-app](https://github.com/Recon-Fuzz/create-chimera-app-2) repo.
@@ -14,10 +8,10 @@ The `ActorManager` contract serves as the source of truth for actors that are be
14
8
15
9
The primary functions of interest when setting up a suite are:
16
10
-`_addActor` - allows adding a new address as an actor that can be tracked
17
-
-`_switchActor` - allows the fuzzer to change the actor returned by `_getActor`
18
-
- this should be exposed in a target function that can be called by the fuzzer to test random combinations of actors calling state changing target functions
11
+
-`_switchActor` - this should be exposed in a target function that can be called by the fuzzer to randomly switch between actors
19
12
20
13
To use the actors stored in the ActorManager, add the `asActor` modifier on all of your target function handlers which pranks as the currently set actor.
14
+
21
15
For privileged functions you can use the `asAdmin` modifier which calls the target functions as the tester contract (`address(this)`). The tester contract is typically set as the default admin address by convention.
A minimal `MockERC20` contract that lets you mock any standard ERC20 tokens that will be interacting with the system without requiring external dependencies.
0 commit comments