generated from foundry-rs/hardhat-foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 214
/
readonlyreentrancy.wsd
61 lines (43 loc) · 923 Bytes
/
readonlyreentrancy.wsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@startuml
class Target {
' -- inheritance --
' -- usingFor --
' -- vars --
+{static}[[IERC20]] token
-{static}[[ICurve]] pool
+[[mapping address=>uint ]] balanceOf
' -- methods --
+stake()
+unstake()
+🔍getReward()
}
class Exploit_ReadOnly {
' -- inheritance --
{abstract}TestHarness
' -- usingFor --
' -- vars --
#[[AttackerContract]] attackerContract
#[[Target]] target
#[[address]] attacker
' -- methods --
+setUp()
+test_attack()
}
class AttackerContract {
' -- inheritance --
{abstract}TestHarness
' -- usingFor --
' -- vars --
-{static}[[ICurve]] pool
+{static}[[IERC20]] lpToken
-[[Target]] target
' -- methods --
+**__constructor__**()
+💰**__constructor__**()
+💰setup()
+💰pwn()
}
' -- inheritance / usingFor --
Exploit_ReadOnly --[#DarkGoldenRod]|> TestHarness
AttackerContract --[#DarkGoldenRod]|> TestHarness
@enduml