-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
58 lines (46 loc) · 1.57 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
set positional-arguments
# private_key := env_var('PRIVATE_KEY')
# deploy_stub := "RUST_BACKTRACE=full forge create --private-key"
deploy_stub := "RUST_BACKTRACE=full forge create -i"
localhost := "--rpc-url http://localhost:9650/ext/bc/C/rpc"
rinkeby := "--rpc-url https://eth-rinkeby.alchemyapi.io/v2/u4_QrkpLMT25csR4QhEgEcpx-pbWynQa"
fuji := "--rpc-url https://api.avax-test.network/ext/bc/C/rpc"
bet_factory := "src/BetFactory.sol:BetFactory"
# deploy-local:
# {{deploy_stub}} {{private_key}} {{localhost}} src/BetFactory.sol:BetFactory
deploy *args='':
#!/usr/bin/env sh
if [ "$1" = "local" ]; then
{{deploy_stub}} $2 {{localhost}} {{bet_factory}}
elif [ "$1" == "rinkeby" ]; then
{{deploy_stub}} $2 {{rinkeby}} {{bet_factory}}
elif [ "$1" == "fuji" ]; then
{{deploy_stub}} $2 {{fuji}} {{bet_factory}}
else
echo "env $1 not recognized"
fi
build:
forge build
test:
forge test
compile:
npx hardhat compile
hh *args='':
#!/usr/bin/env sh
if [ "$1" == "hh" ]; then
npx hardhat run scripts/script.ts --network hardhat
elif [ "$1" == "local" ]; then
npx hardhat run scripts/script.ts --network local
elif [ "$1" == "fuji" ]; then
npx hardhat run scripts/script.ts --network fuji
elif [ "$1" == "mainnet" ]; then
npx hardhat run scripts/script.ts --network mainnet
else
echo "env $1 not recognized"
fi
test_bet:
npx hardhat run scripts/test_emit.ts
test_12:
npx hardhat run scripts/test_12.ts
test_hash:
npx hardhat run scripts/sha3.ts