-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (47 loc) · 2.24 KB
/
Makefile
File metadata and controls
56 lines (47 loc) · 2.24 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
.PHONY: build test coverage clean deploy-staging deploy-production verify-staging verify-production
build:
forge build
test:
forge test
test-fast:
forge test --fuzz-runs 100 --no-match-contract Invariants
coverage:
forge coverage
clean:
forge clean
deploy-staging:
@test -f .env.staging || (echo "Error: .env.staging not found. Copy .env.staging.example to .env.staging and fill in values." && exit 1)
@bash -c 'set -a && source .env.staging && set +a && forge script script/Deploy.s.sol:DeployScript \
--rpc-url $$RPC_URL \
--private-key $$PRIVATE_KEY \
--broadcast \
--verify \
--etherscan-api-key $$ETHERSCAN_API_KEY \
--verifier-url https://api.etherscan.io/v2/api?chainid=8453 \
-vvvv'
deploy-production:
@test -f .env.production || (echo "Error: .env.production not found. Copy .env.production.example to .env.production and fill in values." && exit 1)
@echo "WARNING: You are about to deploy to PRODUCTION (Base mainnet)."
@read -p "Are you sure? [y/N] " confirm && [ "$$confirm" = "y" ] || exit 1
@bash -c 'set -a && source .env.production && set +a && forge script script/Deploy.s.sol:DeployScript \
--rpc-url $$RPC_URL \
--private-key $$PRIVATE_KEY \
--broadcast \
--verify \
--etherscan-api-key $$ETHERSCAN_API_KEY \
--verifier-url https://api.etherscan.io/v2/api?chainid=8453 \
-vvvv'
verify-staging:
@test -n "$(ADDRESS)" || (echo "Usage: make verify-staging ADDRESS=0x..." && exit 1)
@bash -c 'set -a && source .env.staging && set +a && forge verify-contract $(ADDRESS) src/RNBWStaking.sol:RNBWStaking \
--etherscan-api-key $$ETHERSCAN_API_KEY \
--verifier-url https://api.etherscan.io/v2/api?chainid=8453 \
--chain-id 8453 \
--constructor-args $$(cast abi-encode "constructor(address,address,address)" $$RNBW_TOKEN $$SAFE_ADDRESS $$SIGNER)'
verify-production:
@test -n "$(ADDRESS)" || (echo "Usage: make verify-production ADDRESS=0x..." && exit 1)
@bash -c 'set -a && source .env.production && set +a && forge verify-contract $(ADDRESS) src/RNBWStaking.sol:RNBWStaking \
--etherscan-api-key $$ETHERSCAN_API_KEY \
--verifier-url https://api.etherscan.io/v2/api?chainid=8453 \
--chain-id 8453 \
--constructor-args $$(cast abi-encode "constructor(address,address,address)" $$RNBW_TOKEN $$SAFE_ADDRESS $$SIGNER)'