-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (48 loc) · 1.25 KB
/
Makefile
File metadata and controls
60 lines (48 loc) · 1.25 KB
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
# ── DARK MATTER FARM — MAKEFILE ──────────────────────────
# Usage: make <target>
# Requires: Foundry (forge, cast, anvil)
-include .env
export
.PHONY: build test test-v snapshot gas clean deploy-local deploy-xrpl install
## Install forge-std (run once after cloning)
install:
forge install foundry-rs/forge-std --no-commit
## Build contracts
build:
forge build
## Run all tests
test:
forge test -vvvv
## Run tests with gas report
gas:
forge test --gas-report
## Run a specific test (usage: make match T=test_stake)
match:
forge test --match-test $(T) -vvvv
## Snapshot gas usage
snapshot:
forge snapshot
## Clean build artifacts
clean:
forge clean
## Start local anvil node
anvil:
anvil --chain-id 31337
## Deploy to local anvil
deploy-local:
forge script script/Deploy.s.sol:DeployDarkMatterFarm \
--rpc-url localhost \
--private-key $(PRIVATE_KEY) \
--broadcast \
-vvvv
## Deploy to XRPL EVM Testnet
## NOTE: --legacy is REQUIRED — XRPL EVM does not support EIP-1559
deploy-xrpl:
forge script script/Deploy.s.sol:DeployDarkMatterFarm \
--rpc-url $(XRPL_RPC_URL) \
--private-key $(PRIVATE_KEY) \
--broadcast \
--legacy \
--gas-price 100000000000 \
--gas-limit 3000000 \
-vvvv