@gvnrdao/dh-sdk 0.0.277 → 0.0.278

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -31364,17 +31364,17 @@ var require_pkg_src = __commonJS({
31364
31364
  hash: "d6eb8665fa4f1fe19b6a2bc81fbf729af68a1daf30117f40e37705381978a7ce"
31365
31365
  },
31366
31366
  pkpValidator: {
31367
- cid: "QmTqsmXkjib7CRGFcEhmCs61Z3EZTaRPznaZDDLk5Wq9NX",
31367
+ cid: "QmRAueBjNG78qA79x4NL4ogfNg7e6j6DiEGenEN4S3BSGg",
31368
31368
  authorizedCidHex: cidToHex(
31369
- "QmTqsmXkjib7CRGFcEhmCs61Z3EZTaRPznaZDDLk5Wq9NX"
31369
+ "QmRAueBjNG78qA79x4NL4ogfNg7e6j6DiEGenEN4S3BSGg"
31370
31370
  ),
31371
31371
  name: "Pkp Validator",
31372
31372
  description: "Production Pkp Validator",
31373
31373
  version: "1.0.0",
31374
31374
  deployed: true,
31375
- deployedAt: 1777311468630,
31376
- size: 3999,
31377
- hash: "baba8c31b73dbfe6425d8f9fd69c61f41a573e189a185962382b815a15fddb24",
31375
+ deployedAt: 1781116572961,
31376
+ size: 4110,
31377
+ hash: "c3b121afcdc0d7d7ed7ca3be5b185fc502ffad99bf83cdf166769bbfa5194687",
31378
31378
  validatorWalletAddress: "0x9ee56687f7a984d5df7ab79330271a619ef56ddd",
31379
31379
  pkp: {
31380
31380
  publicKey: "0x04ec0e3acc40884e3f366ca469d08899eb640ad5259fa196b0238075086208a9f8732a3175704f35f0bcc28e07406cfb24c254efd1e7355640577330f0d2dd755f",
@@ -31382,120 +31382,120 @@ var require_pkg_src = __commonJS({
31382
31382
  }
31383
31383
  },
31384
31384
  btcTransactionSigner: {
31385
- cid: "QmYMA6hLroPC2uGHeS1AxSz1xAwpZZRpGqZd3hQx3tf63o",
31385
+ cid: "QmTrtAnUFpAi6tpw74UPCiULqe9Z4SBE4b4neekY8evK5Y",
31386
31386
  authorizedCidHex: cidToHex(
31387
- "QmYMA6hLroPC2uGHeS1AxSz1xAwpZZRpGqZd3hQx3tf63o"
31387
+ "QmTrtAnUFpAi6tpw74UPCiULqe9Z4SBE4b4neekY8evK5Y"
31388
31388
  ),
31389
31389
  name: "Btc Transaction Signer",
31390
31390
  description: "Production Btc Transaction Signer",
31391
31391
  version: "1.0.0",
31392
31392
  deployed: true,
31393
- deployedAt: 1780400513420,
31394
- size: 27884,
31395
- hash: "b7e4abec403555d85e2b0eaabed0fdd95640b5f0d068c67bba63afaa2cd200d0"
31393
+ deployedAt: 1780976122896,
31394
+ size: 41048,
31395
+ hash: "93725b2020e1914e93f1e21bdcc75d9cb28bc0b6bc4ea9b470f112e1f068998f"
31396
31396
  },
31397
31397
  ucdMintValidator: {
31398
- cid: "QmUtDgwYFqbLhhBkhRfHRTN51SyHm1CHcCQU2qUvpCzpfc",
31398
+ cid: "QmTWKgfSHfYWTosPJBzu2s4sM2U6qhvmA9pXbkUzDxdQTJ",
31399
31399
  authorizedCidHex: cidToHex(
31400
- "QmUtDgwYFqbLhhBkhRfHRTN51SyHm1CHcCQU2qUvpCzpfc"
31400
+ "QmTWKgfSHfYWTosPJBzu2s4sM2U6qhvmA9pXbkUzDxdQTJ"
31401
31401
  ),
31402
31402
  name: "Ucd Mint Validator",
31403
31403
  description: "Production Ucd Mint Validator",
31404
31404
  version: "1.0.0",
31405
31405
  deployed: true,
31406
- deployedAt: 1780485728736,
31407
- size: 67380,
31408
- hash: "901f0ec80a04cb9daad84c35c69bcf0dc8892a05ae9431a23c1855e1ab9aed9d",
31409
- validatorWalletAddress: "0x36f3dd61c4c08a56d29ed2fd6d5f111b67b6a7a1",
31406
+ deployedAt: 1781116591564,
31407
+ size: 68521,
31408
+ hash: "5a955863b32c003314ab29c37b157e06d00a2f93c2d9085a02ca73b71838a72f",
31409
+ validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31410
31410
  pkp: {
31411
31411
  publicKey: "0x041ab17cd91fc5c0b761eea6092d032807561b621b82c488826776e04a9158d61ba64d809a4729f0501289d980732cb06d8dfd06999dd9c8efd2f495dad78b31bb",
31412
- ethAddress: "0x4D9299055093938d0CD2F26C42A87260CB50adD8"
31412
+ ethAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236"
31413
31413
  }
31414
31414
  },
31415
31415
  processPaymentValidator: {
31416
- cid: "QmcMditbgi5wMzTxzwypKjM7PqPnmpmuUigw7hN8jkShiS",
31416
+ cid: "QmVJ9UaUz8vfvHCEwVY584e9RTEcqy3f3T89UNtzzFSdcz",
31417
31417
  authorizedCidHex: cidToHex(
31418
- "QmcMditbgi5wMzTxzwypKjM7PqPnmpmuUigw7hN8jkShiS"
31418
+ "QmVJ9UaUz8vfvHCEwVY584e9RTEcqy3f3T89UNtzzFSdcz"
31419
31419
  ),
31420
31420
  name: "Process Payment Validator",
31421
31421
  description: "Production Process Payment Validator",
31422
31422
  version: "1.0.0",
31423
31423
  deployed: true,
31424
- deployedAt: 1780400542927,
31425
- size: 64086,
31426
- hash: "e4794a8fadfe03ecc7f25c834279a96f5342a5564e1851a7dca0e96d221f51a1",
31427
- validatorWalletAddress: "0xc2ed5a59bd81eb4d1a19a0147b86ab69aa4c28ba",
31424
+ deployedAt: 1780976120346,
31425
+ size: 64473,
31426
+ hash: "8cf2ea8e2bf39ab02c6ac1706d8bec2aa16aa1f04f4789b11fa8215e04ac2d7e",
31427
+ validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31428
31428
  pkp: {
31429
31429
  publicKey: "0x04cfccb9b6c7addc79469c0e9fafebef4c70801302c62cdb26b610723a9b8527d23f98a40158c7340d83fd0e62d02b5ec74c12f7a86d98e8c6973b4811110f19ad",
31430
- ethAddress: "0x440Fd7B157766b95eb551825C06DF4f92E41D55b"
31430
+ ethAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236"
31431
31431
  }
31432
31432
  },
31433
31433
  extendPositionValidator: {
31434
- cid: "QmSCnZGHNCKNArhogT2xvGgfb58qhfM3APFWQmmkSA1jbz",
31434
+ cid: "QmW2zjWbsVzm8q4oMEHZ1SCeijygZFMvvi9zHqUQWm3jut",
31435
31435
  authorizedCidHex: cidToHex(
31436
- "QmSCnZGHNCKNArhogT2xvGgfb58qhfM3APFWQmmkSA1jbz"
31436
+ "QmW2zjWbsVzm8q4oMEHZ1SCeijygZFMvvi9zHqUQWm3jut"
31437
31437
  ),
31438
31438
  name: "Extend Position Validator",
31439
31439
  description: "Production Extend Position Validator",
31440
31440
  version: "1.0.1",
31441
31441
  deployed: true,
31442
- deployedAt: 1780385632236,
31443
- size: 63008,
31444
- hash: "7e3ac42b2f26e2ab9a0801e2f94da8d9dbcf02a8bf27a78b954d79832d8eb1a7",
31445
- validatorWalletAddress: "0xb3f4271c475887a86a2f21446f0968c30cc74c97",
31442
+ deployedAt: 1781116610064,
31443
+ size: 63508,
31444
+ hash: "187c71046858bde0753fe479634bd2901e3d7f3689b5f39a82b3c5fa3a47b53d",
31445
+ validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31446
31446
  pkp: {
31447
31447
  publicKey: "0x04e52338f6a0c3362800f1a94c4c8f08be5030dde0fa217388c53d1c1a4790f4443c9f2886b2d2d8f4b75a9a156e9b028011b1a1cf7648da0e556aa980ec692836",
31448
- ethAddress: "0x4cb7651Ba27610991A5775486B5F4487F3Dd7cDA"
31448
+ ethAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236"
31449
31449
  }
31450
31450
  },
31451
31451
  btcWithdrawal: {
31452
- cid: "QmNqErzpgDUair9bPK7oPQczjKjRcsmcej37izponrEcqp",
31452
+ cid: "QmcxHLCcXpx5Jstd1hQmwjU2KPDzP2KYEdMgbZVn84nY6n",
31453
31453
  authorizedCidHex: cidToHex(
31454
- "QmNqErzpgDUair9bPK7oPQczjKjRcsmcej37izponrEcqp"
31454
+ "QmcxHLCcXpx5Jstd1hQmwjU2KPDzP2KYEdMgbZVn84nY6n"
31455
31455
  ),
31456
31456
  name: "Btc Withdrawal",
31457
31457
  description: "Production Btc Withdrawal",
31458
31458
  version: "1.0.0",
31459
31459
  deployed: true,
31460
- deployedAt: 1780651980768,
31461
- size: 75137,
31462
- hash: "368f9aea32cf2e660b0f75b88b6ee043cf5956319d7b3c6c695d4b984b3bd555",
31463
- validatorWalletAddress: "0xbb137fbda353199e9419b698c57a742124d4987d",
31460
+ deployedAt: 1781116627244,
31461
+ size: 76218,
31462
+ hash: "1e686e517ab1b8163904a27d3e1962cecb2f49b3cc7ecdc8f2ff5e5847fe3762",
31463
+ validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31464
31464
  pkp: {
31465
31465
  publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
31466
- ethAddress: "0x7b9316cAA00B257F7CE30F7F6979bd6867BA9eE2"
31466
+ ethAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236"
31467
31467
  }
31468
31468
  },
31469
31469
  liquidationValidator: {
31470
- cid: "QmVLyKW74S6jMeAssqsGmy7VwGRAHYzdUqLJBuAyvDMo99",
31470
+ cid: "QmZv8cRhvQqEGscWufU4rYPrKNt3ruAhQWK2ei3ohJBiZA",
31471
31471
  authorizedCidHex: cidToHex(
31472
- "QmVLyKW74S6jMeAssqsGmy7VwGRAHYzdUqLJBuAyvDMo99"
31472
+ "QmZv8cRhvQqEGscWufU4rYPrKNt3ruAhQWK2ei3ohJBiZA"
31473
31473
  ),
31474
31474
  name: "Liquidation Validator",
31475
31475
  description: "Production Liquidation Validator",
31476
31476
  version: "1.0.0",
31477
31477
  deployed: true,
31478
- deployedAt: 1780385670005,
31479
- size: 54164,
31480
- hash: "cd32efc888d2808dfc81a75a6d97095f543efa12edb61c9070a4003c47d5f4a0",
31481
- validatorWalletAddress: "0x1542f863ee0340f6a067573e80ae66dd9b3838fa",
31478
+ deployedAt: 1781116646357,
31479
+ size: 54901,
31480
+ hash: "017ec04899089b98991a5aab6eeae5e3214c2cc9de7ef9b3fc0cd5ad85c3556c",
31481
+ validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31482
31482
  pkp: {
31483
31483
  publicKey: "0x041a241de58976c13e3d7ca5a18e494f7330151e3818706135d50176e78ffb673e58b11f0b67a87c73fade6c6b27d6e7a7377ea9f4c10bf31880f1d725f18cc6f8",
31484
- ethAddress: "0x8770470620Db25bBf2BFBca1eF7Bdd6CF91ab1b5"
31484
+ ethAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236"
31485
31485
  }
31486
31486
  },
31487
31487
  priceOracle: {
31488
- cid: "QmVk6KHLn6jimvheCUaZ2emvp4nxot2SUkotnjfbeRXvyp",
31488
+ cid: "QmZwH2JzXpLPdtUiM52PLyfuCGphz82CCs54Y6fCbzxpri",
31489
31489
  authorizedCidHex: cidToHex(
31490
- "QmVk6KHLn6jimvheCUaZ2emvp4nxot2SUkotnjfbeRXvyp"
31490
+ "QmZwH2JzXpLPdtUiM52PLyfuCGphz82CCs54Y6fCbzxpri"
31491
31491
  ),
31492
31492
  name: "Price Oracle",
31493
31493
  description: "Production Price Oracle (Chipotle main+getPrivateKey)",
31494
31494
  version: "1.1.0",
31495
31495
  deployed: true,
31496
- deployedAt: 1780385689501,
31497
- size: 8354,
31498
- hash: "adc4d5181b22b9ad7e788c7aa846c556585062fe3fadf7586a5c5ba38a25b535",
31496
+ deployedAt: 1781116663270,
31497
+ size: 8695,
31498
+ hash: "ba20ade60a7fa5acd80dadfafa179c507388cfe6ce48a22a672d70b317ffcc74",
31499
31499
  validatorWalletAddress: "0x831ddf3048547b983efe3ccbbb35a45a53191651",
31500
31500
  pkp: {
31501
31501
  publicKey: "0x043beaa1da47875601a8d6f430b1438ee2d4732eefd06e5c63a474bbdaf9e7df1797b1b951e041b627c2bf839788164825324c9cbd1e2d6f740fdd4bff69b1900b",
@@ -31503,21 +31503,21 @@ var require_pkg_src = __commonJS({
31503
31503
  }
31504
31504
  },
31505
31505
  loanVaultBtcBalance: {
31506
- cid: "QmUogHM5eg7J811HG4JBWQz6sGk2nDQctrM2wSUEfa2wQP",
31506
+ cid: "Qmd7ZAWQzxjbFXjk39HuyRCN18FDG1LDifXceaikNFYRbm",
31507
31507
  authorizedCidHex: cidToHex(
31508
- "QmUogHM5eg7J811HG4JBWQz6sGk2nDQctrM2wSUEfa2wQP"
31508
+ "Qmd7ZAWQzxjbFXjk39HuyRCN18FDG1LDifXceaikNFYRbm"
31509
31509
  ),
31510
31510
  name: "Loan Vault Btc Balance",
31511
31511
  description: "Production Loan Vault Btc Balance",
31512
31512
  version: "1.0.0",
31513
31513
  deployed: true,
31514
- deployedAt: 1780385701675,
31515
- size: 44009,
31516
- hash: "cd12e9ea2ca660675fa84ab199fb5f579f45003f137270b56569c528ef15f88a",
31517
- validatorWalletAddress: "0x47feea74c8739d24b44faa67217f2f99970e15e7",
31514
+ deployedAt: 1780976125009,
31515
+ size: 44634,
31516
+ hash: "f7ba0f8778a15f349122237c44391800bb082d2090a87cc1631f0a764439d029",
31517
+ validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31518
31518
  pkp: {
31519
31519
  publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
31520
- ethAddress: "0x7b9316cAA00B257F7CE30F7F6979bd6867BA9eE2"
31520
+ ethAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236"
31521
31521
  }
31522
31522
  },
31523
31523
  // btc-address-balance (Option B) — address-only signed total balance via
@@ -31527,17 +31527,17 @@ var require_pkg_src = __commonJS({
31527
31527
  // Requires BitcoinProviderRegistry.addAllowedCid(chainId, keccak256(utf8(cid)))
31528
31528
  // on each target chain (the action decrypts registry slots). No OAR entry.
31529
31529
  btcAddressBalance: {
31530
- cid: "QmdBMy7Niz4Vsgbmh1Pm3aXK8PL3uJwS7GDeoCKd8Yuua6",
31530
+ cid: "QmVmF9CHFDhhV51bNX87tVyd95oQS56u78ThFYKzMwEbFS",
31531
31531
  authorizedCidHex: cidToHex(
31532
- "QmdBMy7Niz4Vsgbmh1Pm3aXK8PL3uJwS7GDeoCKd8Yuua6"
31532
+ "QmVmF9CHFDhhV51bNX87tVyd95oQS56u78ThFYKzMwEbFS"
31533
31533
  ),
31534
31534
  name: "Btc Address Balance",
31535
31535
  description: "Address-only signed total BTC balance via registry consensus (no positionId, no price)",
31536
31536
  version: "0.1.0",
31537
31537
  deployed: true,
31538
- deployedAt: 1780485650442,
31539
- size: 21864,
31540
- hash: "8369701c40e742ec54d34fec373f21cfd75f5dfd3ece4bc5358c7566032e7605",
31538
+ deployedAt: 1781116681558,
31539
+ size: 21957,
31540
+ hash: "b17977304be6b117bcb29feafc3bb654113d72d5147ceeba92e91b4d7f5c0327",
31541
31541
  validatorWalletAddress: "0xf0bf5e3f864b87283a05d1e4a85ee0fa40493fb5",
31542
31542
  pkp: {
31543
31543
  publicKey: "0x0498cbb31facfa26e3ec83ccdabfe4fe341ca0282e0c3cb81da7113723b9726e1e49efa92165cc3faa66ced4454cea56dbab12267852d6525a55d7c4f128b912cd",
@@ -31571,17 +31571,17 @@ var require_pkg_src = __commonJS({
31571
31571
  hash: "03ee5be239c91c735d2c95db89a0d1b77e602cfc18af8eb64b3281fddcd90a72"
31572
31572
  },
31573
31573
  staleSpendRecoveryValidator: {
31574
- cid: "QmRxZVY3J5zPoUTHMPDUDxWKQfTNg4dBajmBC62i9Ekj5q",
31574
+ cid: "QmRZuRrxzsbp3WejuMfJJgws1iteRk87p1nGna82Cgun2k",
31575
31575
  authorizedCidHex: cidToHex(
31576
- "QmRxZVY3J5zPoUTHMPDUDxWKQfTNg4dBajmBC62i9Ekj5q"
31576
+ "QmRZuRrxzsbp3WejuMfJJgws1iteRk87p1nGna82Cgun2k"
31577
31577
  ),
31578
31578
  name: "Stale Spend Recovery Validator",
31579
31579
  description: "Production Stale Spend Recovery Validator",
31580
31580
  version: "1.0.0",
31581
31581
  deployed: true,
31582
- deployedAt: 1779894230882,
31583
- size: 31039,
31584
- hash: "05aa6f9959ce49f3b417120b386bf3d51d60f6a953147567ad08e2df8d703d98",
31582
+ deployedAt: 1781116700324,
31583
+ size: 31148,
31584
+ hash: "c93591c7c7f51b519243499d78bd5ac0df1e368caa76c08d6a5d7aea9e3a49cc",
31585
31585
  validatorWalletAddress: "0xa804bbb01d26f250fb3c53007fd32337b985602b",
31586
31586
  pkp: {
31587
31587
  publicKey: "0x046da0ad6da7dd4a0063cbeac6f2bdb6a9889c2178b23470833356a8ee5630f7f0eee0db348d9d9aaaadd23eccf0063c8f68ee5e446abe30b882bf1de4c932bc21",
@@ -33865,6 +33865,10 @@ ${errorReport}`);
33865
33865
  static {
33866
33866
  this.REQUIRED_PROVIDER_COUNT = 3;
33867
33867
  }
33868
+ /** Distinct providers required for the active mode: 1 in hardhat dev, else 3. */
33869
+ requiredCount() {
33870
+ return this.devSingleProvider ? 1 : _PriceOracleModule.REQUIRED_PROVIDER_COUNT;
33871
+ }
33868
33872
  /**
33869
33873
  * @param priceProvidersOrConfig - REQUIRED in production flows. An array of
33870
33874
  * exactly 3 `{name, apiKey}` entries, one per locked provider. Every entry
@@ -33876,7 +33880,8 @@ ${errorReport}`);
33876
33880
  * The strict count is still enforced (exactly 3).
33877
33881
  * @param _mode - Ignored. Retained for backward-compatible call sites.
33878
33882
  */
33879
- constructor(priceProvidersOrConfig, legacySources, _mode) {
33883
+ constructor(priceProvidersOrConfig, legacySources, _mode, opts) {
33884
+ this.devSingleProvider = opts?.devSingleProvider === true;
33880
33885
  if (legacySources && Array.isArray(legacySources)) {
33881
33886
  this.sources = legacySources;
33882
33887
  } else {
@@ -33895,9 +33900,9 @@ ${errorReport}`);
33895
33900
  * path flagged as H-2 in the audit. There is no "≥3" or "3 of N" mode.
33896
33901
  */
33897
33902
  validateProviderCount() {
33898
- if (this.sources.length !== _PriceOracleModule.REQUIRED_PROVIDER_COUNT) {
33903
+ if (this.sources.length !== this.requiredCount()) {
33899
33904
  throw new Error(
33900
- `Price oracle requires exactly ${_PriceOracleModule.REQUIRED_PROVIDER_COUNT} providers. Currently configured: ${this.sources.length} provider(s). Locked production set: ${_PriceOracleModule.ACTIVE_PROVIDER_NAMES.join(", ")}`
33905
+ `Price oracle requires exactly ${this.requiredCount()} provider(s). Currently configured: ${this.sources.length} provider(s). ` + (this.devSingleProvider ? "(hardhat dev single-provider mode)" : `Locked production set: ${_PriceOracleModule.ACTIVE_PROVIDER_NAMES.join(", ")}`)
33901
33906
  );
33902
33907
  }
33903
33908
  }
@@ -33913,9 +33918,9 @@ ${errorReport}`);
33913
33918
  * Throws as soon as any rule is violated.
33914
33919
  */
33915
33920
  buildSources(priceProviders) {
33916
- if (priceProviders.length !== _PriceOracleModule.REQUIRED_PROVIDER_COUNT) {
33921
+ if (priceProviders.length !== this.requiredCount()) {
33917
33922
  throw new Error(
33918
- `priceProviders must contain exactly ${_PriceOracleModule.REQUIRED_PROVIDER_COUNT} entries. Received: ${priceProviders.length}. Locked production set: ${_PriceOracleModule.ACTIVE_PROVIDER_NAMES.join(", ")}`
33923
+ `priceProviders must contain exactly ${this.requiredCount()} entr${this.requiredCount() === 1 ? "y" : "ies"}. Received: ${priceProviders.length}. ` + (this.devSingleProvider ? "(hardhat dev single-provider mode)" : `Locked production set: ${_PriceOracleModule.ACTIVE_PROVIDER_NAMES.join(", ")}`)
33919
33924
  );
33920
33925
  }
33921
33926
  const sources = [];
@@ -34111,9 +34116,9 @@ ${errorReport}`);
34111
34116
  */
34112
34117
  async getBTCPrice() {
34113
34118
  const startTime = Date.now();
34114
- if (this.sources.length !== _PriceOracleModule.REQUIRED_PROVIDER_COUNT) {
34119
+ if (this.sources.length !== this.requiredCount()) {
34115
34120
  throw new Error(
34116
- `Price oracle requires exactly ${_PriceOracleModule.REQUIRED_PROVIDER_COUNT} providers. Currently configured: ${this.sources.length}`
34121
+ `Price oracle requires exactly ${this.requiredCount()} provider(s). Currently configured: ${this.sources.length}`
34117
34122
  );
34118
34123
  }
34119
34124
  const GLOBAL_TIMEOUT_MS = 8e3;
@@ -34142,14 +34147,19 @@ ${errorReport}`);
34142
34147
  );
34143
34148
  const prices = await Promise.race([fetchAll, timeoutPromise]);
34144
34149
  const sorted = [...prices].sort((a, b2) => a - b2);
34145
- const median = sorted[1];
34146
- const spread = (sorted[2] - sorted[0]) / sorted[0];
34147
- if (spread > PRICE_ORACLE_TOLERANCE) {
34148
- const names2 = this.sources.map((s) => s.name).join(", ");
34149
- const formatted = sorted.map((p) => `$${p.toLocaleString()}`).join(", ");
34150
- throw new Error(
34151
- `Price consensus failed: prices not within ${PRICE_ORACLE_TOLERANCE * 100}% tolerance. Providers: [${names2}]. Prices: [${formatted}]`
34152
- );
34150
+ let median;
34151
+ if (this.devSingleProvider) {
34152
+ median = sorted[0];
34153
+ } else {
34154
+ median = sorted[1];
34155
+ const spread = (sorted[2] - sorted[0]) / sorted[0];
34156
+ if (spread > PRICE_ORACLE_TOLERANCE) {
34157
+ const names2 = this.sources.map((s) => s.name).join(", ");
34158
+ const formatted = sorted.map((p) => `$${p.toLocaleString()}`).join(", ");
34159
+ throw new Error(
34160
+ `Price consensus failed: prices not within ${PRICE_ORACLE_TOLERANCE * 100}% tolerance. Providers: [${names2}]. Prices: [${formatted}]`
34161
+ );
34162
+ }
34153
34163
  }
34154
34164
  const priceCents = Math.round(median * 100);
34155
34165
  const priceWith8Decimals = BigInt(priceCents) * 1000000n;