forked from panukettu/pkxp-forge-safe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
37 lines (31 loc) · 1.14 KB
/
justfile
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
set positional-arguments
set dotenv-load
@sign message:
echo "-> Signing $1" && \
bun utils/ffi.ts signMessage $1
@safe-dry script func:
echo "-> Simulating.." && \
forge script $1 --sig "$2()" --ffi -vvv && \
echo "-> $1.$2() ran successfully" && \
forge script SafeScript --sig "simulateAndSign(string,uint256)" $2 0 --ffi -vvv && \
echo "-> Success! run 'just safe-file SIGNED_BATCH_OUTPUT_FILENAME' to send it."
@safe-run script func:
forge script $1 --sig "$2()" --ffi -vvv && \
echo "-> $1.$2() ran successfully" && \
echo "-> Sending (signature required).." && \
forge script SafeScript --sig "sendBatch(string)" $2 --ffi -vvv && \
echo "-> Sent!"
@safe-run-nonce script func nonce:
forge script $1 --sig "$2()" --ffi -vvv && \
echo "-> $1.$2() ran successfully" && \
echo "-> Sending (signature required).." && \
forge script SafeScript --sig "sendBatch(string,uint256)" $2 $3 --ffi -vvv && \
echo "-> Sent!"
@safe-file batchfile:
echo "-> Sending $1.." && \
bun utils/ffi.ts proposeBatch $1 true && \
echo "-> Sent!"
@safe-del safeTxHash:
echo "-> Sign to delete $1" && \
bun utils/ffi.ts deleteBatch $1 && \
echo "-> Deleted $1"