-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
27 lines (20 loc) · 989 Bytes
/
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
export ETH_RPC_URL := env_var_or_default("ETH_RPC_URL", "http://127.0.0.1:9650")
export MNEMONIC := env_var_or_default("MNEMONIC", "test test test test test test test test test test test junk")
# First key from MNEMONIC
export PRIVATE_KEY := env_var_or_default("PRIVATE_KEY", "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80")
# Autoload a .env if one exists
set dotenv-load
# Print out some help
default:
@just --list --unsorted
setup:
git submodule update --init --recursive
build:
forge build
# Run forge unit tests
test contract="." test="." *flags="":
@# Using date here to give some randomness to tests that use block.timestamp
forge test --allow-failure --block-timestamp `date '+%s'` --match-contract {{contract}} --match-test {{test}} {{flags}}
# Run forge unit tests forking $ETH_RPC_URL
test-fork contract="." test="." *flags="":
forge test --fork-url=${ETH_RPC_URL} --allow-failure --match-contract {{contract}} --match-test {{test}} {{flags}}