chore(settlement): add +$90M headroom configs and production mint env sync
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 54s
CI/CD Pipeline / Security Scanning (push) Successful in 2m25s
CI/CD Pipeline / Lint and Format (push) Failing after 44s
CI/CD Pipeline / Terraform Validation (push) Failing after 23s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 25s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 39s
Validation / validate-genesis (push) Successful in 28s
Validation / validate-terraform (push) Failing after 26s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 10s
Validation / validate-security (push) Failing after 1m13s
Validation / validate-documentation (push) Failing after 17s
Verify Deployment / Verify Deployment (push) Failing after 53s
Some checks failed
CI/CD Pipeline / Solidity Contracts (push) Failing after 54s
CI/CD Pipeline / Security Scanning (push) Successful in 2m25s
CI/CD Pipeline / Lint and Format (push) Failing after 44s
CI/CD Pipeline / Terraform Validation (push) Failing after 23s
CI/CD Pipeline / Kubernetes Validation (push) Successful in 25s
Deploy ChainID 138 / Deploy ChainID 138 (push) Failing after 39s
Validation / validate-genesis (push) Successful in 28s
Validation / validate-terraform (push) Failing after 26s
Validation / validate-kubernetes (push) Failing after 10s
Validation / validate-smart-contracts (push) Failing after 10s
Validation / validate-security (push) Failing after 1m13s
Validation / validate-documentation (push) Failing after 17s
Verify Deployment / Verify Deployment (push) Failing after 53s
Support configurable Fineract headroom adjustment JSON paths and a helper to emit mint/RPC/bitcoind keys for secure.omdnl.org deploy without printing secrets. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
30
config/offices/btc-m2-headroom-adjustment-20260721.v1.json
Normal file
30
config/offices/btc-m2-headroom-adjustment-20260721.v1.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"description": "Restore Office 24 M2 mint headroom +$90M for 1,000 BTC cBTC @ $90k policy rate.",
|
||||
"amountUsd": 90000000,
|
||||
"amountEnv": "BTC_M2_HEADROOM_ADJ_USD",
|
||||
"currencyCode": "USD",
|
||||
"transactionDate": "2026-07-21",
|
||||
"entries": [
|
||||
{
|
||||
"memo": "T-BTC-ADJ-HO-20260721",
|
||||
"officeId": 1,
|
||||
"debitGlCode": "2100",
|
||||
"creditGlCode": "2410",
|
||||
"comments": "Policy adjustment — HO allocation +$90M M2 backing for BTC/cBTC mint"
|
||||
},
|
||||
{
|
||||
"memo": "T-BTC-ADJ-BR-20260721",
|
||||
"officeId": 24,
|
||||
"debitGlCode": "1410",
|
||||
"creditGlCode": "2100",
|
||||
"comments": "Policy adjustment — branch receipt +$90M for BTC mint headroom"
|
||||
},
|
||||
{
|
||||
"memo": "T-M1M2-BTC-ADJ-20260721",
|
||||
"officeId": 24,
|
||||
"debitGlCode": "2100",
|
||||
"creditGlCode": "2200",
|
||||
"comments": "M1→M2 broad-money +$90M for cBTC mint capacity"
|
||||
}
|
||||
]
|
||||
}
|
||||
30
config/offices/btc-m2-headroom-adjustment-20260721b.v1.json
Normal file
30
config/offices/btc-m2-headroom-adjustment-20260721b.v1.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"description": "Second +$90M M2 boost — bring M2−M3 headroom to $90M for 1,000 BTC mint gate.",
|
||||
"amountUsd": 90000000,
|
||||
"amountEnv": "BTC_M2_HEADROOM_ADJ_USD",
|
||||
"currencyCode": "USD",
|
||||
"transactionDate": "2026-07-21",
|
||||
"entries": [
|
||||
{
|
||||
"memo": "T-BTC-ADJ-HO-20260721B",
|
||||
"officeId": 1,
|
||||
"debitGlCode": "2100",
|
||||
"creditGlCode": "2410",
|
||||
"comments": "Policy adjustment — second HO +$90M M2 backing tranche"
|
||||
},
|
||||
{
|
||||
"memo": "T-BTC-ADJ-BR-20260721B",
|
||||
"officeId": 24,
|
||||
"debitGlCode": "1410",
|
||||
"creditGlCode": "2100",
|
||||
"comments": "Policy adjustment — second branch +$90M receipt"
|
||||
},
|
||||
{
|
||||
"memo": "T-M1M2-BTC-ADJ-20260721B",
|
||||
"officeId": 24,
|
||||
"debitGlCode": "2100",
|
||||
"creditGlCode": "2200",
|
||||
"comments": "Second M1→M2 +$90M for cBTC mint headroom"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11,7 +11,10 @@ import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const repoRoot = path.resolve(__dirname, '../..');
|
||||
const configPath = path.join(repoRoot, 'config/offices/btc-m2-headroom-adjustment-20260720.v1.json');
|
||||
const configPath =
|
||||
process.argv.find((a) => a.endsWith('.json')) ||
|
||||
process.env.BTC_M2_HEADROOM_CONFIG ||
|
||||
path.join(repoRoot, 'config/offices/btc-m2-headroom-adjustment-20260720.v1.json');
|
||||
|
||||
const dryRun = process.argv.includes('--dry-run');
|
||||
const cfg = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
||||
|
||||
56
scripts/deployment/sync-production-mint-env.mjs
Normal file
56
scripts/deployment/sync-production-mint-env.mjs
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Merge mint/RPC/bitcoind keys from repo .env into production env fragment (no stdout secrets).
|
||||
*
|
||||
* node scripts/deployment/sync-production-mint-env.mjs --write .env.production-mint.fragment
|
||||
*/
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const repoRoot = path.resolve(__dirname, '../..');
|
||||
const envFile = process.env.OMNL_BANK_ENV || path.join(repoRoot, '.env');
|
||||
|
||||
function parseEnv(file) {
|
||||
const out = {};
|
||||
if (!fs.existsSync(file)) return out;
|
||||
for (const line of fs.readFileSync(file, 'utf8').split(/\r?\n/)) {
|
||||
if (!line || line.startsWith('#') || !line.includes('=')) continue;
|
||||
const i = line.indexOf('=');
|
||||
out[line.slice(0, i).trim()] = line.slice(i + 1);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
const env = parseEnv(envFile);
|
||||
const keys = [
|
||||
'OMNL_MINT_OPERATOR_PRIVATE_KEY',
|
||||
'RPC_URL_138',
|
||||
'CHAIN_138_RPC_URL',
|
||||
'SETTLEMENT_ALLOW_CHAIN_MINT_EXECUTE',
|
||||
'OMNL_ALLOW_CHAIN_MINT_EXECUTE',
|
||||
'BITCOIND_RPC_URL',
|
||||
'BITCOIND_RPC_USER',
|
||||
'BITCOIND_RPC_PASS',
|
||||
'BTC_NETWORK',
|
||||
'BTC_CONFIRMATIONS_REQUIRED',
|
||||
'OMNL_BTC_WALLET_CONFIG',
|
||||
'OMNL_BTC_LEDGER_CONFIG',
|
||||
'CBTC_ADDRESS_138',
|
||||
'DODO_PMM_INTEGRATION',
|
||||
'CHAIN138_ORACLE_URL',
|
||||
];
|
||||
|
||||
const lines = keys
|
||||
.filter((k) => env[k]?.trim())
|
||||
.map((k) => `${k}=${env[k].trim()}`);
|
||||
|
||||
const writeArg = process.argv.indexOf('--write');
|
||||
if (writeArg >= 0) {
|
||||
const out = process.argv[writeArg + 1] || path.join(repoRoot, '.env.production-mint.fragment');
|
||||
fs.writeFileSync(out, `${lines.join('\n')}\n`, 'utf8');
|
||||
console.log(`Wrote ${lines.length} keys to ${out}`);
|
||||
} else {
|
||||
console.log(lines.map((l) => `${l.split('=')[0]}=***`).join('\n'));
|
||||
}
|
||||
Reference in New Issue
Block a user