-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
141 lines (103 loc) · 3.13 KB
/
deploy.sh
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
forge script script/Luck.s.sol:LotteryScript --rpc-url http://127.0.0.1:8545 --broadcast
forge script script/AddERC20.s.sol:LotteryScript --rpc-url http://127.0.0.1:8545 --broadcast
export USDT=0xdac17f958d2ee523a2206206994597c13d831ec7
export LUCKY_USER=0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503
export ALICE=0x5E661B79FE2D3F6cE70F5AAC07d8Cd9abb2743F1
cast call $USDT \
"balanceOf(address)(uint256)" \
$LUCKY_USER
# This calls Anvil and lets us impersonate our lucky user
cast rpc anvil_impersonateAccount $LUCKY_USER
cast send $USDT \
--unlocked \
--from $LUCKY_USER \
"transfer(address,uint256)(bool)" \
$ALICE \
1220000115485
cast call $USDT \
"balanceOf(address)(uint256)" \
$ALICE
# =====>
export ALICE=0x9DCCe783B6464611f38631e6C851bf441907c710
cast call $USDT \
"balanceOf(address)(uint256)" \
$LUCKY_USER
# This calls Anvil and lets us impersonate our lucky user
cast rpc anvil_impersonateAccount $LUCKY_USER
cast send $USDT \
--unlocked \
--from $LUCKY_USER \
"transfer(address,uint256)(bool)" \
$ALICE \
1220000115485
cast call $USDT \
"balanceOf(address)(uint256)" \
$ALICE
# // =====
export USDC=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
export LUCKY_USER=0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503
export ALICE=0x5E661B79FE2D3F6cE70F5AAC07d8Cd9abb2743F1
cast call $USDC \
"balanceOf(address)(uint256)" \
$LUCKY_USER
# This calls Anvil and lets us impersonate our lucky user
cast rpc anvil_impersonateAccount $LUCKY_USER
cast send $USDC \
--unlocked \
--from $LUCKY_USER \
"transfer(address,uint256)(bool)" \
$ALICE \
1220000115485
cast call $USDC \
"balanceOf(address)(uint256)" \
$ALICE
# =====>
export ALICE=0x9DCCe783B6464611f38631e6C851bf441907c710
cast call $USDC \
"balanceOf(address)(uint256)" \
$LUCKY_USER
# This calls Anvil and lets us impersonate our lucky user
cast rpc anvil_impersonateAccount $LUCKY_USER
cast send $USDC \
--unlocked \
--from $LUCKY_USER \
"transfer(address,uint256)(bool)" \
$ALICE \
1220000115485
cast call $USDC \
"balanceOf(address)(uint256)" \
$ALICE
# // =====
export SHIB=0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE
export LUCKY_USER=0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503
export ALICE=0x5E661B79FE2D3F6cE70F5AAC07d8Cd9abb2743F1
cast call $SHIB \
"balanceOf(address)(uint256)" \
$LUCKY_USER
# This calls Anvil and lets us impersonate our lucky user
cast rpc anvil_impersonateAccount $LUCKY_USER
cast send $SHIB \
--unlocked \
--from $LUCKY_USER \
"transfer(address,uint256)(bool)" \
$ALICE \
766000000000000000000000000
cast call $SHIB \
"balanceOf(address)(uint256)" \
$ALICE
# =====>
export ALICE=0x9DCCe783B6464611f38631e6C851bf441907c710
cast call $SHIB \
"balanceOf(address)(uint256)" \
$LUCKY_USER
# This calls Anvil and lets us impersonate our lucky user
cast rpc anvil_impersonateAccount $LUCKY_USER
cast send $SHIB \
--unlocked \
--from $LUCKY_USER \
"transfer(address,uint256)(bool)" \
$ALICE \
766000000000000000000000000
cast call $SHIB \
"balanceOf(address)(uint256)" \
$ALICE