forked from yieldprotocol/vault-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
105 lines (96 loc) · 4.74 KB
/
Justfile
File metadata and controls
105 lines (96 loc) · 4.74 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
set dotenv-load := true
# Show available commands
@default:
just --list
# Compile contracts
build:
forge build
# Run unit tests only (no fork tests)
test:
forge test --no-match-path "test/fork/**"
# Run fork tests (requires MAINNET_RPC)
test-fork:
: "${MAINNET_RPC:?MAINNET_RPC is required for fork tests}"
forge test --match-path "test/fork/**"
# Run tests matching a path pattern
# Example: just test-match "**/MentoSpotOracleBasic.t.sol"
test-match pattern:
forge test --match-path "{{pattern}}"
# Deploy core contracts for a chain
# Example: just deploy-core celo
# Example: just deploy-core base
# Example: just deploy-core arbitrum
# Optional flags arg can pass extra forge flags, e.g. --verify --slow
# Example: just deploy-core base "--verify --slow"
deploy-core chain flags="":
case "{{chain}}" in \
celo) \
: "${CELO_RPC:?CELO_RPC is required}"; \
forge script script/celo/DeployCelo.s.sol:DeployCelo --rpc-url "$CELO_RPC" --broadcast {{flags}} ;; \
base) \
: "${BASE_RPC:?BASE_RPC is required}"; \
forge script script/base/DeployBase.s.sol:DeployBase --rpc-url "$BASE_RPC" --broadcast {{flags}} ;; \
arbitrum) \
: "${ARBITRUM_RPC:?ARBITRUM_RPC is required}"; \
forge script script/arbitrum/DeployArbitrum.s.sol:DeployArbitrum --rpc-url "$ARBITRUM_RPC" --broadcast {{flags}} ;; \
*) echo "Unsupported chain '{{chain}}' (expected: celo|base|arbitrum)"; exit 1 ;; \
esac
# Configure market wiring for a chain+asset market
# Supported markets:
# - celo usdt-kesm (or usdtkesm)
# - celo full (full ConfigureCelo flow)
# - base ausdc-cngn (or ausdccngn)
# - base ausdc-usdc (or ausdcusdc)
# - arbitrum aarbusdcn-usdc (or aarbusdcnusdc)
# Example: just deploy-market base ausdc-cngn
deploy-market chain asset flags="":
case "{{chain}}:{{asset}}" in \
celo:usdt-kesm|celo:usdtkesm) \
: "${CELO_RPC:?CELO_RPC is required}"; \
forge script script/celo/ConfigureUSDTKESm.s.sol:ConfigureUSDTKESm --rpc-url "$CELO_RPC" --broadcast {{flags}} ;; \
celo:full) \
: "${CELO_RPC:?CELO_RPC is required}"; \
forge script script/celo/ConfigureCelo.s.sol:ConfigureCelo --rpc-url "$CELO_RPC" --broadcast {{flags}} ;; \
base:ausdc-cngn|base:ausdccngn) \
: "${BASE_RPC:?BASE_RPC is required}"; \
forge script script/base/ConfigureABASUSDCCNGN.s.sol:ConfigureAUSDCCNGN --rpc-url "$BASE_RPC" --broadcast {{flags}} ;; \
base:ausdc-usdc|base:ausdcusdc) \
: "${BASE_RPC:?BASE_RPC is required}"; \
forge script script/base/ConfigureABASUSDCUSDC.s.sol:ConfigureAUSDCUSDC --rpc-url "$BASE_RPC" --broadcast {{flags}} ;; \
arbitrum:aarbusdcn-usdc|arbitrum:aarbusdcnusdc|arbitrum:aarbusdcn-usdc-may2026|arbitrum:aarbusdcnusdcmay2026) \
: "${ARBITRUM_RPC:?ARBITRUM_RPC is required}"; \
forge script script/arbitrum/ConfigureAARBUSDCNUSDC.s.sol:ConfigureAARBUSDCNUSDC --rpc-url "$ARBITRUM_RPC" --broadcast {{flags}} ;; \
*) echo "Unsupported chain/asset '{{chain}}:{{asset}}'"; exit 1 ;; \
esac
# Deploy/register FYToken series for a chain+asset market
# Supported markets:
# - celo usdt-kesm (or usdtkesm)
# - base ausdc-cngn (or ausdccngn)
# - base ausdc-usdc (or ausdcusdc)
# - arbitrum aarbusdcn-usdc-may2026 (or aarbusdcnusdcmay2026)
# Example: just deploy-series base ausdc-cngn
deploy-series chain asset flags="":
case "{{chain}}:{{asset}}" in \
celo:usdt-kesm|celo:usdtkesm) \
: "${CELO_RPC:?CELO_RPC is required}"; \
forge script script/celo/DeployFYKESm.s.sol:DeployFYKESm --rpc-url "$CELO_RPC" --broadcast {{flags}} ;; \
base:ausdc-cngn|base:ausdccngn) \
: "${BASE_RPC:?BASE_RPC is required}"; \
forge script script/base/DeployFYCNGNMay2026.s.sol:DeployFYCNGNMay2026 --rpc-url "$BASE_RPC" --broadcast {{flags}} ;; \
base:ausdc-usdc|base:ausdcusdc) \
: "${BASE_RPC:?BASE_RPC is required}"; \
forge script script/base/DeployFYUSDCMay2026.s.sol:DeployFYUSDCMay2026 --rpc-url "$BASE_RPC" --broadcast {{flags}} ;; \
arbitrum:aarbusdcn-usdc|arbitrum:aarbusdcnusdc|arbitrum:aarbusdcn-usdc-may2026|arbitrum:aarbusdcnusdcmay2026) \
: "${ARBITRUM_RPC:?ARBITRUM_RPC is required}"; \
forge script script/arbitrum/DeployFYUSDCMay2026.s.sol:DeployFYUSDCMay2026 --rpc-url "$ARBITRUM_RPC" --broadcast {{flags}} ;; \
*) echo "Unsupported chain/asset '{{chain}}:{{asset}}'"; exit 1 ;; \
esac
# Convenience: run full split flow (core -> market -> series)
# Requires env vars for the chosen chain/asset to already be set.
# Example: just deploy-all base ausdc-cngn
# Example: just deploy-all celo usdt-kesm "--verify --slow"
deploy-all chain asset flags="":
just deploy-core {{chain}} "{{flags}}"
just deploy-market {{chain}} {{asset}} "{{flags}}"
just deploy-series {{chain}} {{asset}} "{{flags}}"