chore: refresh deployment status and solana policies

This commit is contained in:
defiQUG
2026-04-18 12:05:17 -07:00
parent 0b089f1181
commit 5aa162e6b3
6 changed files with 2052 additions and 19 deletions

View File

@@ -31,6 +31,8 @@ Validates `config/deployment-status.json` for minimum viable deployed graph. Use
- If `bridgeAvailable === true` on a chain, `cwTokens` must include at least **cWUSDT** and **cWUSDC** (phase 1).
- For each `pmmPool` and each `pmmPoolsVolatile[]` entry: `role` ∈ {defense, public_routing, truu_routing}; `feeBps` and `k` present; `base`/`quote` (or `tokenIn`/`tokenOut`) exist in `cwTokens` or `anchorAddresses` (e.g. mainnet **TRUU** under `anchorAddresses.TRUU`). Non-zero `poolAddress` must not be the zero address.
- For each `gasReferenceVenues[]` entry: `supported` must be explicit, `aggregatorOnly` is only valid for `1inch`, `supported=false` means the lane is explicitly unsupported (and can never be live), and `supported=true` with `live=false` / `routingVisible=false` means the lane is planned or staged.
- `aggregatorOnly=true` rows are routing overlays, not stand-alone live venues.
**Run:**

View File

@@ -78,6 +78,30 @@ function validatePoolEntries(chainId, pools, listLabel, knownTokens, errors) {
}
}
function validateUniswapV2Entries(chainId, pools, knownTokens, errors) {
for (let i = 0; i < pools.length; i++) {
const pool = pools[i];
const base = pool.base;
const quote = pool.quote;
if (!base || !knownTokens.has(base)) {
errors.push(`Chain ${chainId} uniswapV2Pools[${i}]: base "${base}" not in cwTokens or anchorAddresses`);
}
if (!quote || !knownTokens.has(quote)) {
errors.push(`Chain ${chainId} uniswapV2Pools[${i}]: quote "${quote}" not in cwTokens or anchorAddresses`);
}
if (!pool.poolAddress || looksPlaceholderAddress(String(pool.poolAddress).toLowerCase())) {
errors.push(`Chain ${chainId} uniswapV2Pools[${i}]: poolAddress must use a real deployed pair address`);
}
if (pool.venue && pool.venue !== 'uniswap_v2_pair') {
errors.push(`Chain ${chainId} uniswapV2Pools[${i}]: venue must be "uniswap_v2_pair" when set`);
}
if (pool.publicRoutingEnabled === true && (!pool.factoryAddress || !pool.routerAddress)) {
errors.push(`Chain ${chainId} uniswapV2Pools[${i}]: publicRoutingEnabled rows require factoryAddress and routerAddress`);
}
}
}
function main() {
const status = loadJson(DEPLOYMENT_STATUS_PATH);
const chains = status.chains || {};
@@ -89,6 +113,7 @@ function main() {
const anchorAddresses = chain.anchorAddresses || {};
const gasQuoteAddresses = chain.gasQuoteAddresses || {};
const pmmPools = chain.pmmPools || [];
const uniswapV2Pools = chain.uniswapV2Pools || [];
const pmmPoolsVolatile = chain.pmmPoolsVolatile || [];
const gasPmmPools = chain.gasPmmPools || [];
const gasReferenceVenues = chain.gasReferenceVenues || [];
@@ -110,6 +135,7 @@ function main() {
]);
validatePoolEntries(chainId, pmmPools, 'pmmPools', knownTokens, errors);
validateUniswapV2Entries(chainId, uniswapV2Pools, knownTokens, errors);
validatePoolEntries(chainId, pmmPoolsVolatile, 'pmmPoolsVolatile', knownTokens, errors);
validatePoolEntries(chainId, gasPmmPools, 'gasPmmPools', knownTokens, errors);
@@ -139,12 +165,18 @@ function main() {
if (!VALID_REFERENCE_PROTOCOLS.includes(venue.protocol)) {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: protocol must be one of ${VALID_REFERENCE_PROTOCOLS.join(', ')}`);
}
if (typeof venue.supported !== 'boolean') {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: supported must be set explicitly to true or false`);
}
if (!venue.familyKey || typeof venue.familyKey !== 'string') {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: familyKey required`);
continue;
}
if (!referenceVenuesByFamily.has(venue.familyKey)) referenceVenuesByFamily.set(venue.familyKey, []);
referenceVenuesByFamily.get(venue.familyKey).push(venue);
if (venue.aggregatorOnly === true && venue.protocol !== '1inch') {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: aggregatorOnly rows must use protocol "1inch"`);
}
if (isLiveRow(venue)) {
if (!VALID_NATIVE_REFERENCE_PROTOCOLS.includes(venue.protocol)) {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: live/routingVisible rows must use a native protocol contract, not "${venue.protocol}"`);
@@ -153,6 +185,12 @@ function main() {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: live/routingVisible venueAddress must use a native protocol contract, not a placeholder scaffold (${venue.venueAddress})`);
}
}
if (venue.supported === false && isLiveRow(venue)) {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: supported=false rows cannot be live/routingVisible`);
}
if (venue.supported === false && venue.protocol === '1inch' && venue.aggregatorOnly !== true) {
errors.push(`Chain ${chainId} gasReferenceVenues[${i}]: unsupported 1inch rows must be marked aggregatorOnly=true`);
}
}
for (const [familyKey, venues] of referenceVenuesByFamily.entries()) {