@morpho-dev/router 0.12.0 → 0.12.1
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/cli.js +799 -316
- package/dist/drizzle/migrations/0050_contract-sync-v1.16.sql +305 -0
- package/dist/drizzle/migrations/meta/0050_snapshot.json +2035 -0
- package/dist/drizzle/migrations/meta/_journal.json +7 -0
- package/dist/evm/bytecode/morpho.txt +1 -1
- package/dist/index.browser.d.mts +60 -47
- package/dist/index.browser.d.mts.map +1 -1
- package/dist/index.browser.mjs +127 -77
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +130 -90
- package/dist/index.node.d.mts.map +1 -1
- package/dist/index.node.mjs +733 -314
- package/dist/index.node.mjs.map +1 -1
- package/dist/{server-D4xxddev.js → server-DNFuP89-.js} +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/dist/index.node.d.mts
CHANGED
|
@@ -546,7 +546,7 @@ declare const MorphoV2: readonly [{
|
|
|
546
546
|
readonly name: "obligation";
|
|
547
547
|
}, {
|
|
548
548
|
readonly type: "uint256";
|
|
549
|
-
readonly name: "
|
|
549
|
+
readonly name: "units";
|
|
550
550
|
}, {
|
|
551
551
|
readonly type: "address";
|
|
552
552
|
readonly name: "onBehalf";
|
|
@@ -757,7 +757,7 @@ declare const MorphoV2: readonly [{
|
|
|
757
757
|
readonly stateMutability: "nonpayable";
|
|
758
758
|
readonly inputs: readonly [{
|
|
759
759
|
readonly type: "uint256";
|
|
760
|
-
readonly name: "
|
|
760
|
+
readonly name: "units";
|
|
761
761
|
}, {
|
|
762
762
|
readonly type: "address";
|
|
763
763
|
readonly name: "taker";
|
|
@@ -809,7 +809,7 @@ declare const MorphoV2: readonly [{
|
|
|
809
809
|
readonly name: "maker";
|
|
810
810
|
}, {
|
|
811
811
|
readonly type: "uint256";
|
|
812
|
-
readonly name: "
|
|
812
|
+
readonly name: "maxUnits";
|
|
813
813
|
}, {
|
|
814
814
|
readonly type: "uint256";
|
|
815
815
|
readonly name: "start";
|
|
@@ -1059,7 +1059,7 @@ declare const MorphoV2: readonly [{
|
|
|
1059
1059
|
readonly name: "obligation";
|
|
1060
1060
|
}, {
|
|
1061
1061
|
readonly type: "uint256";
|
|
1062
|
-
readonly name: "
|
|
1062
|
+
readonly name: "units";
|
|
1063
1063
|
}, {
|
|
1064
1064
|
readonly type: "address";
|
|
1065
1065
|
readonly name: "onBehalf";
|
|
@@ -1230,7 +1230,7 @@ declare const MorphoV2: readonly [{
|
|
|
1230
1230
|
readonly indexed: true;
|
|
1231
1231
|
}, {
|
|
1232
1232
|
readonly type: "uint256";
|
|
1233
|
-
readonly name: "
|
|
1233
|
+
readonly name: "units";
|
|
1234
1234
|
}, {
|
|
1235
1235
|
readonly type: "address";
|
|
1236
1236
|
readonly name: "onBehalf";
|
|
@@ -1448,7 +1448,7 @@ declare const MorphoV2: readonly [{
|
|
|
1448
1448
|
readonly name: "sellerAssets";
|
|
1449
1449
|
}, {
|
|
1450
1450
|
readonly type: "uint256";
|
|
1451
|
-
readonly name: "
|
|
1451
|
+
readonly name: "units";
|
|
1452
1452
|
}, {
|
|
1453
1453
|
readonly type: "address";
|
|
1454
1454
|
readonly name: "sellerReceiver";
|
|
@@ -1474,7 +1474,7 @@ declare const MorphoV2: readonly [{
|
|
|
1474
1474
|
readonly indexed: true;
|
|
1475
1475
|
}, {
|
|
1476
1476
|
readonly type: "uint256";
|
|
1477
|
-
readonly name: "
|
|
1477
|
+
readonly name: "units";
|
|
1478
1478
|
}, {
|
|
1479
1479
|
readonly type: "address";
|
|
1480
1480
|
readonly name: "onBehalf";
|
|
@@ -1834,20 +1834,20 @@ declare const CollateralSchema: z$1.ZodObject<{
|
|
|
1834
1834
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1835
1835
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1836
1836
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
1837
|
-
maxLif: z$1.
|
|
1837
|
+
maxLif: z$1.ZodBigInt;
|
|
1838
1838
|
}, z$1.core.$strip>;
|
|
1839
1839
|
declare const CollateralsSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1840
1840
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1841
1841
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
1842
1842
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
1843
|
-
maxLif: z$1.
|
|
1843
|
+
maxLif: z$1.ZodBigInt;
|
|
1844
1844
|
}, z$1.core.$strip>>;
|
|
1845
1845
|
declare const from$16: (parameters: from$16.Parameters) => from$16.ReturnType;
|
|
1846
1846
|
declare namespace from$16 {
|
|
1847
1847
|
type Parameters = {
|
|
1848
1848
|
asset: Address;
|
|
1849
1849
|
lltv: Options | bigint;
|
|
1850
|
-
maxLif
|
|
1850
|
+
maxLif: bigint;
|
|
1851
1851
|
oracle: Address;
|
|
1852
1852
|
};
|
|
1853
1853
|
type ReturnType = Collateral;
|
|
@@ -2036,7 +2036,7 @@ declare const ObligationSchema: z$1.ZodObject<{
|
|
|
2036
2036
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2037
2037
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2038
2038
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
2039
|
-
maxLif: z$1.
|
|
2039
|
+
maxLif: z$1.ZodBigInt;
|
|
2040
2040
|
}, z$1.core.$strip>>;
|
|
2041
2041
|
maturity: z$1.ZodPipe<z$1.ZodNumber, z$1.ZodTransform<Maturity, number>>;
|
|
2042
2042
|
rcfThreshold: z$1.ZodBigInt;
|
|
@@ -2111,7 +2111,8 @@ declare const tupleAbi: readonly [{
|
|
|
2111
2111
|
* Collateral.from({
|
|
2112
2112
|
* asset: privateKeyToAccount(generatePrivateKey()).address,
|
|
2113
2113
|
* oracle: privateKeyToAccount(generatePrivateKey()).address,
|
|
2114
|
-
* lltv: 0.965
|
|
2114
|
+
* lltv: 0.965,
|
|
2115
|
+
* maxLif: 0n,
|
|
2115
2116
|
* }),
|
|
2116
2117
|
* ],
|
|
2117
2118
|
* maturity: Maturity.from("end_of_next_quarter"),
|
|
@@ -2164,7 +2165,7 @@ declare namespace key$1 {
|
|
|
2164
2165
|
collaterals: {
|
|
2165
2166
|
asset: Address;
|
|
2166
2167
|
lltv: bigint;
|
|
2167
|
-
maxLif
|
|
2168
|
+
maxLif: bigint;
|
|
2168
2169
|
oracle: Address;
|
|
2169
2170
|
}[];
|
|
2170
2171
|
maturity: number;
|
|
@@ -2338,8 +2339,8 @@ declare namespace Offer_d_exports {
|
|
|
2338
2339
|
export { InvalidOfferError, Offer, OfferConsumed, OfferInput, OfferSchema, RandomConfig, Status, Validation, consumedEvent, decode$1 as decode, encode$1 as encode, from$13 as from, fromSnakeCase$1 as fromSnakeCase, hash, liquidateEvent, random$1 as random, repayEvent, serialize, supplyCollateralEvent, takeEvent, toSnakeCase, withdrawCollateralEvent };
|
|
2339
2340
|
}
|
|
2340
2341
|
type Offer = {
|
|
2341
|
-
/** The address that made the offer. */readonly maker: Address; /** The max
|
|
2342
|
-
readonly
|
|
2342
|
+
/** The address that made the offer. */readonly maker: Address; /** The max units to trade. */
|
|
2343
|
+
readonly maxUnits: bigint; /** The offer tick. */
|
|
2343
2344
|
readonly tick: number; /** The date at which all interests will be paid. */
|
|
2344
2345
|
readonly maturity: Maturity; /** Recovery-close-factor threshold in obligation units. */
|
|
2345
2346
|
readonly rcfThreshold: bigint; /** The date at which the offer will expire. */
|
|
@@ -2368,7 +2369,7 @@ type Validation = {
|
|
|
2368
2369
|
};
|
|
2369
2370
|
declare const OfferSchema: () => z$1.ZodObject<{
|
|
2370
2371
|
maker: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2371
|
-
|
|
2372
|
+
maxUnits: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBigInt>>;
|
|
2372
2373
|
tick: z$1.ZodCoercedNumber<unknown>;
|
|
2373
2374
|
maturity: z$1.ZodPipe<z$1.ZodNumber, z$1.ZodTransform<Maturity, number>>;
|
|
2374
2375
|
rcfThreshold: z$1.ZodBigInt;
|
|
@@ -2382,7 +2383,7 @@ declare const OfferSchema: () => z$1.ZodObject<{
|
|
|
2382
2383
|
asset: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2383
2384
|
oracle: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
2384
2385
|
lltv: z$1.ZodPipe<z$1.ZodBigInt, z$1.ZodTransform<LLTV, bigint>>;
|
|
2385
|
-
maxLif: z$1.
|
|
2386
|
+
maxLif: z$1.ZodBigInt;
|
|
2386
2387
|
}, z$1.core.$strip>>;
|
|
2387
2388
|
callback: z$1.ZodObject<{
|
|
2388
2389
|
address: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<`0x${string}`, string>>;
|
|
@@ -2402,10 +2403,10 @@ declare const OfferSchema: () => z$1.ZodObject<{
|
|
|
2402
2403
|
*
|
|
2403
2404
|
* All values validated to be non-negative and within bytes32 range.
|
|
2404
2405
|
*/
|
|
2405
|
-
type OfferInput = Compute<Omit<Offer, "group" | "session" | "
|
|
2406
|
+
type OfferInput = Compute<Omit<Offer, "group" | "session" | "maxUnits" | "rcfThreshold" | "receiverIfMakerIsSeller" | "exitOnly"> & {
|
|
2406
2407
|
group: Hex | bigint | number | string; /** Optional: defaults to zero bytes32. */
|
|
2407
2408
|
session?: Hex | bigint | number | string; /** Optional: defaults to 0n. */
|
|
2408
|
-
|
|
2409
|
+
maxUnits?: bigint; /** Recovery-close-factor threshold in obligation units. */
|
|
2409
2410
|
rcfThreshold: bigint; /** Optional: defaults to maker for backward compatibility. */
|
|
2410
2411
|
receiverIfMakerIsSeller?: Address; /** Optional: defaults to false. */
|
|
2411
2412
|
exitOnly?: boolean;
|
|
@@ -2445,7 +2446,7 @@ declare function toSnakeCase(offer: Offer): Snake<Offer>;
|
|
|
2445
2446
|
*/
|
|
2446
2447
|
declare const serialize: (offer: Offer) => {
|
|
2447
2448
|
maker: `0x${string}`;
|
|
2448
|
-
|
|
2449
|
+
maxUnits: string;
|
|
2449
2450
|
tick: number;
|
|
2450
2451
|
maturity: number;
|
|
2451
2452
|
rcfThreshold: string;
|
|
@@ -2474,7 +2475,7 @@ type RandomConfig = {
|
|
|
2474
2475
|
collateralTokens?: Address[];
|
|
2475
2476
|
assetsDecimals?: Record<Address, number>;
|
|
2476
2477
|
buy?: boolean;
|
|
2477
|
-
|
|
2478
|
+
maxUnits?: bigint;
|
|
2478
2479
|
maker?: Address;
|
|
2479
2480
|
maturity?: Maturity;
|
|
2480
2481
|
rcfThreshold?: bigint;
|
|
@@ -2558,7 +2559,7 @@ declare const takeEvent: {
|
|
|
2558
2559
|
readonly indexed: false;
|
|
2559
2560
|
readonly internalType: "uint256";
|
|
2560
2561
|
}, {
|
|
2561
|
-
readonly name: "
|
|
2562
|
+
readonly name: "units";
|
|
2562
2563
|
readonly type: "uint256";
|
|
2563
2564
|
readonly indexed: false;
|
|
2564
2565
|
readonly internalType: "uint256";
|
|
@@ -2631,7 +2632,7 @@ declare const repayEvent: {
|
|
|
2631
2632
|
readonly indexed: true;
|
|
2632
2633
|
readonly internalType: "bytes32";
|
|
2633
2634
|
}, {
|
|
2634
|
-
readonly name: "
|
|
2635
|
+
readonly name: "units";
|
|
2635
2636
|
readonly type: "uint256";
|
|
2636
2637
|
readonly indexed: false;
|
|
2637
2638
|
readonly internalType: "uint256";
|
|
@@ -3013,7 +3014,7 @@ declare class InvalidQuoteError extends BaseError<z$1.ZodError | Error> {
|
|
|
3013
3014
|
constructor(error: z$1.ZodError | Error);
|
|
3014
3015
|
}
|
|
3015
3016
|
declare namespace Tick_d_exports {
|
|
3016
|
-
export { InvalidPriceError, InvalidTickError, MAX_PRICE, TICK_RANGE,
|
|
3017
|
+
export { InvalidPriceError, InvalidTickError, MAX_PRICE, TICK_RANGE, assetsToUnits, priceToTick, tickToPrice, unitsToAssets };
|
|
3017
3018
|
}
|
|
3018
3019
|
/** Tick domain supported by Morpho V2. */
|
|
3019
3020
|
declare const TICK_RANGE = 990;
|
|
@@ -3040,19 +3041,30 @@ declare namespace priceToTick {
|
|
|
3040
3041
|
type ErrorType = InvalidPriceError;
|
|
3041
3042
|
}
|
|
3042
3043
|
/**
|
|
3043
|
-
* Converts
|
|
3044
|
-
*
|
|
3044
|
+
* Converts units into maker-side assets using the raw tick price surface.
|
|
3045
|
+
* This is the public forward conversion used by the router for lot sizing and other maker-facing capacity math.
|
|
3046
|
+
* - `buy = true` -> `floor(units * price / WAD)`
|
|
3047
|
+
* - `buy = false` -> `ceil(units * price / WAD)`
|
|
3048
|
+
* @param units - The units to convert.
|
|
3045
3049
|
* @param tick - The offer tick.
|
|
3046
|
-
* @
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
*
|
|
3050
|
+
* @param buy - Whether the maker side of the offer is buy (`true`) or sell (`false`).
|
|
3051
|
+
* @returns The equivalent amount in maker-side assets.
|
|
3052
|
+
*/
|
|
3053
|
+
declare function unitsToAssets(units: bigint, tick: number, buy: boolean): bigint;
|
|
3054
|
+
/**
|
|
3055
|
+
* Converts a maker-side asset cap into a safe units cap using the raw tick price.
|
|
3056
|
+
* Buy offers use the max-safe inverse of `floor(units * price / WAD)`.
|
|
3057
|
+
* Sell offers use the max-safe inverse of `ceil(units * price / WAD)`.
|
|
3058
|
+
* The result is clamped to the remaining offer size because the asset cap may have been rounded before inversion.
|
|
3059
|
+
* Zero integer asset caps can still admit positive units on floor-rounded sub-WAD buy ticks, and tick=0 keeps the
|
|
3060
|
+
* whole remaining interval safe because the raw maker-asset surface stays at zero.
|
|
3061
|
+
* @param assets - The integer maker-side asset cap.
|
|
3052
3062
|
* @param tick - The offer tick.
|
|
3053
|
-
* @
|
|
3063
|
+
* @param buy - Whether the maker side of the offer is buy (`true`) or sell (`false`).
|
|
3064
|
+
* @param remainingUnits - The maximum units still available on the offer.
|
|
3065
|
+
* @returns The greatest safe units amount under the maker-side raw-price surface.
|
|
3054
3066
|
*/
|
|
3055
|
-
declare function
|
|
3067
|
+
declare function assetsToUnits(assets: bigint, tick: number, buy: boolean, remainingUnits: bigint): bigint;
|
|
3056
3068
|
declare class InvalidTickError extends BaseError {
|
|
3057
3069
|
readonly name = "Tick.InvalidTickError";
|
|
3058
3070
|
constructor(tick: number);
|
|
@@ -3507,7 +3519,7 @@ type Row = {
|
|
|
3507
3519
|
hash: Hex;
|
|
3508
3520
|
obligationId: Hex;
|
|
3509
3521
|
maker: Address;
|
|
3510
|
-
|
|
3522
|
+
maxUnits: bigint;
|
|
3511
3523
|
tick: number;
|
|
3512
3524
|
maturity: Maturity;
|
|
3513
3525
|
rcfThreshold: bigint;
|
|
@@ -3588,7 +3600,7 @@ declare namespace get$5 {
|
|
|
3588
3600
|
};
|
|
3589
3601
|
type Level = {
|
|
3590
3602
|
/** The offer tick for this level */tick: number; /** Sum of takeable amounts at this tick */
|
|
3591
|
-
|
|
3603
|
+
maxUnits: bigint; /** Number of offers at this tick */
|
|
3592
3604
|
count: number;
|
|
3593
3605
|
};
|
|
3594
3606
|
type ReturnType = {
|
|
@@ -3601,7 +3613,8 @@ declare namespace getOffers$2 {
|
|
|
3601
3613
|
/** The side of the offer. */side: "buy" | "sell"; /** The obligationId of the offer. */
|
|
3602
3614
|
obligationId: Hex; /** Cursor string returned by a previous call, for pagination */
|
|
3603
3615
|
cursor?: string; /** Page size; defaults to {@link DEFAULT_LIMIT} */
|
|
3604
|
-
limit?: number;
|
|
3616
|
+
limit?: number; /** When true, exclude offers whose truncated takeable assets are 0. */
|
|
3617
|
+
requirePositiveTakeableAssets?: boolean;
|
|
3605
3618
|
};
|
|
3606
3619
|
type ReturnType = {
|
|
3607
3620
|
rows: Row[];
|
|
@@ -3626,8 +3639,12 @@ type CallbacksDomain = {
|
|
|
3626
3639
|
/**
|
|
3627
3640
|
* Upsert callbacks and their offer associations.
|
|
3628
3641
|
* @param inputs - Callback associations grouped by offer hash. {@link OfferCallbacks}
|
|
3642
|
+
* @returns Row counts affected in `callbacks` and `offers_callbacks`.
|
|
3629
3643
|
*/
|
|
3630
|
-
upsert: (inputs: OfferCallbacks[]) => Promise<
|
|
3644
|
+
upsert: (inputs: OfferCallbacks[]) => Promise<{
|
|
3645
|
+
callbacksInserted: number;
|
|
3646
|
+
offersCallbacksInserted: number;
|
|
3647
|
+
}>;
|
|
3631
3648
|
/**
|
|
3632
3649
|
* Delete callback associations by offer hashes.
|
|
3633
3650
|
* @param parameters - Offer hashes to delete. {@link DeleteParameters}
|
|
@@ -3650,7 +3667,10 @@ type Event = {
|
|
|
3650
3667
|
blockNumber: number;
|
|
3651
3668
|
};
|
|
3652
3669
|
type ConsumedDomain = {
|
|
3653
|
-
/** Create new consumed events. */create: (parameters: Event[]) => Promise<
|
|
3670
|
+
/** Create new consumed events. */create: (parameters: Event[]) => Promise<{
|
|
3671
|
+
groupsInserted: number;
|
|
3672
|
+
consumedEventsInserted: number;
|
|
3673
|
+
}>; /** Delete multiple consumed events by chain and block number greater than or equal to the given value. */
|
|
3654
3674
|
delete: (parameters: {
|
|
3655
3675
|
chainId: Id;
|
|
3656
3676
|
blockNumberGte: number;
|
|
@@ -3674,8 +3694,9 @@ type GroupsDomain = {
|
|
|
3674
3694
|
/**
|
|
3675
3695
|
* Insert groups (insert-only).
|
|
3676
3696
|
* @param groups - Groups to insert. {@link GroupInput}
|
|
3697
|
+
* @returns Number of group rows inserted.
|
|
3677
3698
|
*/
|
|
3678
|
-
create: (groups: GroupInput[]) => Promise<
|
|
3699
|
+
create: (groups: GroupInput[]) => Promise<number>;
|
|
3679
3700
|
/**
|
|
3680
3701
|
* Check which groups already exist in the database.
|
|
3681
3702
|
* @param groups - Group keys to check. {@link GroupKey}
|
|
@@ -3701,8 +3722,9 @@ type LotsDomain = {
|
|
|
3701
3722
|
* For each (position, group), keeps only the biggest offer by assets.
|
|
3702
3723
|
* If lot exists and new offer is bigger, grows the lot and shifts higher lots.
|
|
3703
3724
|
* Automatically upserts lots_positions bridge rows before inserting lots.
|
|
3725
|
+
* @returns Inserted row counts for `lots_positions` and `lots`.
|
|
3704
3726
|
*/
|
|
3705
|
-
create: (parameters: create$6.Parameters) => Promise<
|
|
3727
|
+
create: (parameters: create$6.Parameters) => Promise<create$6.ReturnType>;
|
|
3706
3728
|
/**
|
|
3707
3729
|
* Get lots with optional filtering.
|
|
3708
3730
|
*/
|
|
@@ -3719,7 +3741,10 @@ declare namespace create$6 {
|
|
|
3719
3741
|
size: bigint;
|
|
3720
3742
|
};
|
|
3721
3743
|
type Parameters = OfferLotInfo[];
|
|
3722
|
-
type ReturnType =
|
|
3744
|
+
type ReturnType = {
|
|
3745
|
+
lotsPositionsInserted: number;
|
|
3746
|
+
lotsInserted: number;
|
|
3747
|
+
};
|
|
3723
3748
|
}
|
|
3724
3749
|
declare namespace get$4 {
|
|
3725
3750
|
type Parameters = {
|
|
@@ -3738,8 +3763,9 @@ type ObligationsDomain = {
|
|
|
3738
3763
|
/**
|
|
3739
3764
|
* Insert obligations and their onchain obligation id keys (insert-only).
|
|
3740
3765
|
* @param obligations - Obligations to insert.
|
|
3766
|
+
* @returns Inserted row counts by table.
|
|
3741
3767
|
*/
|
|
3742
|
-
create: (obligations: create$5.Input[]) => Promise<
|
|
3768
|
+
create: (obligations: create$5.Input[]) => Promise<create$5.ReturnType>;
|
|
3743
3769
|
/**
|
|
3744
3770
|
* Get active obligations with optional chain filters.
|
|
3745
3771
|
* @param parameters - Optional chain filters.
|
|
@@ -3762,6 +3788,11 @@ declare namespace create$5 {
|
|
|
3762
3788
|
morphoV2: Address;
|
|
3763
3789
|
obligation: Obligation$1;
|
|
3764
3790
|
};
|
|
3791
|
+
type ReturnType = {
|
|
3792
|
+
obligationsInserted: number;
|
|
3793
|
+
obligationIdKeysInserted: number;
|
|
3794
|
+
obligationCollateralsInserted: number;
|
|
3795
|
+
};
|
|
3765
3796
|
}
|
|
3766
3797
|
declare namespace get$3 {
|
|
3767
3798
|
type Output = {
|
|
@@ -3808,11 +3839,12 @@ type OraclesDomain = {
|
|
|
3808
3839
|
chainId: Id;
|
|
3809
3840
|
}) => Promise<Oracle[]>;
|
|
3810
3841
|
/**
|
|
3811
|
-
* Upsert oracles
|
|
3842
|
+
* Upsert oracles.
|
|
3812
3843
|
*
|
|
3813
|
-
* @param oracles - Array of oracles to upsert
|
|
3844
|
+
* @param oracles - Array of oracles to upsert.
|
|
3845
|
+
* @returns Number of oracle rows affected by the upsert.
|
|
3814
3846
|
*/
|
|
3815
|
-
upsert: (oracles: Oracle[]) => Promise<
|
|
3847
|
+
upsert: (oracles: Oracle[]) => Promise<number>;
|
|
3816
3848
|
};
|
|
3817
3849
|
//#endregion
|
|
3818
3850
|
//#region src/database/domains/Positions.d.ts
|
|
@@ -4293,6 +4325,13 @@ type CommitAppliedStat = {
|
|
|
4293
4325
|
operation: CommitEntityOperation;
|
|
4294
4326
|
count: number;
|
|
4295
4327
|
};
|
|
4328
|
+
type CommitAppliedDbRowOperation = "inserted" | "upserted" | "deleted";
|
|
4329
|
+
type CommitAppliedDbRowStat = {
|
|
4330
|
+
collector: string;
|
|
4331
|
+
table: string;
|
|
4332
|
+
operation: CommitAppliedDbRowOperation;
|
|
4333
|
+
count: number;
|
|
4334
|
+
};
|
|
4296
4335
|
type RuntimeEventObserver$1 = (parameters: {
|
|
4297
4336
|
event: string;
|
|
4298
4337
|
fields?: Record<string, unknown>;
|
|
@@ -4300,6 +4339,7 @@ type RuntimeEventObserver$1 = (parameters: {
|
|
|
4300
4339
|
type CommitAppliedObserver$1 = (parameters: {
|
|
4301
4340
|
collectors: string[];
|
|
4302
4341
|
stats: CommitAppliedStat[];
|
|
4342
|
+
dbRows: CommitAppliedDbRowStat[];
|
|
4303
4343
|
committedAtUnixMs: number;
|
|
4304
4344
|
}) => void;
|
|
4305
4345
|
type ChainObserver = {
|
|
@@ -4453,12 +4493,12 @@ declare namespace BookResponse_d_exports {
|
|
|
4453
4493
|
type BookLevelResponse = {
|
|
4454
4494
|
tick: number;
|
|
4455
4495
|
price: string;
|
|
4456
|
-
|
|
4496
|
+
max_units: string;
|
|
4457
4497
|
count: number;
|
|
4458
4498
|
};
|
|
4459
4499
|
type Input$1 = {
|
|
4460
4500
|
tick: number;
|
|
4461
|
-
|
|
4501
|
+
maxUnits: bigint;
|
|
4462
4502
|
count: number;
|
|
4463
4503
|
};
|
|
4464
4504
|
declare function from$5(level: Input$1): BookLevelResponse;
|
|
@@ -5176,7 +5216,7 @@ interface components {
|
|
|
5176
5216
|
* @example 500000000000000000
|
|
5177
5217
|
*/
|
|
5178
5218
|
price: string; /** @example 369216000000000000000000 */
|
|
5179
|
-
|
|
5219
|
+
max_units: string; /** @example 5 */
|
|
5180
5220
|
count: number;
|
|
5181
5221
|
};
|
|
5182
5222
|
BadRequestResponse: {
|
|
@@ -5303,7 +5343,7 @@ interface components {
|
|
|
5303
5343
|
* },
|
|
5304
5344
|
* "buy": false,
|
|
5305
5345
|
* "maker": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
5306
|
-
* "
|
|
5346
|
+
* "max_units": "369216000000000000000000",
|
|
5307
5347
|
* "start": 1761922790,
|
|
5308
5348
|
* "expiry": 1761922799,
|
|
5309
5349
|
* "tick": 495,
|
|
@@ -5349,7 +5389,7 @@ interface components {
|
|
|
5349
5389
|
* },
|
|
5350
5390
|
* "buy": false,
|
|
5351
5391
|
* "maker": "0x7b093658BE7f90B63D7c359e8f408e503c2D9401",
|
|
5352
|
-
* "
|
|
5392
|
+
* "max_units": "369216000000000000000000",
|
|
5353
5393
|
* "start": 1761922790,
|
|
5354
5394
|
* "expiry": 1761922799,
|
|
5355
5395
|
* "tick": 495,
|
|
@@ -5397,7 +5437,7 @@ interface components {
|
|
|
5397
5437
|
obligation: components["schemas"]["ObligationOfferResponse"]; /** @example false */
|
|
5398
5438
|
buy: boolean; /** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */
|
|
5399
5439
|
maker: string; /** @example 369216000000000000000000 */
|
|
5400
|
-
|
|
5440
|
+
max_units: string; /** @example 1761922790 */
|
|
5401
5441
|
start: number; /** @example 1761922799 */
|
|
5402
5442
|
expiry: number; /** @example 495 */
|
|
5403
5443
|
tick: number; /** @example 0x000000000000000000000000000000000000000000000000000000000008b8f4 */
|
|
@@ -5595,7 +5635,7 @@ interface components {
|
|
|
5595
5635
|
};
|
|
5596
5636
|
ValidateOfferRequest: {
|
|
5597
5637
|
/** @example 0x7b093658BE7f90B63D7c359e8f408e503c2D9401 */maker: string; /** @example 369216000000000000000000 */
|
|
5598
|
-
|
|
5638
|
+
max_units?: string; /** @example 495 */
|
|
5599
5639
|
tick: number; /** @example 1761922799 */
|
|
5600
5640
|
maturity: number; /** @example 0 */
|
|
5601
5641
|
rcf_threshold: string; /** @example 1761922799 */
|
|
@@ -5681,7 +5721,7 @@ type Input = Readonly<{
|
|
|
5681
5721
|
hash: Hex;
|
|
5682
5722
|
obligationId: Hex;
|
|
5683
5723
|
maker: Address;
|
|
5684
|
-
|
|
5724
|
+
maxUnits: bigint;
|
|
5685
5725
|
tick: number;
|
|
5686
5726
|
maturity: number;
|
|
5687
5727
|
rcfThreshold: bigint;
|
|
@@ -5773,25 +5813,25 @@ declare const schemas: {
|
|
|
5773
5813
|
strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
|
|
5774
5814
|
0: "0";
|
|
5775
5815
|
1: "1";
|
|
5776
|
-
true: "true";
|
|
5777
5816
|
false: "false";
|
|
5778
|
-
|
|
5817
|
+
true: "true";
|
|
5818
|
+
}>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
|
|
5779
5819
|
}, z$1.core.$strip>;
|
|
5780
5820
|
readonly get_health_collectors: z$1.ZodObject<{
|
|
5781
5821
|
strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
|
|
5782
5822
|
0: "0";
|
|
5783
5823
|
1: "1";
|
|
5784
|
-
true: "true";
|
|
5785
5824
|
false: "false";
|
|
5786
|
-
|
|
5825
|
+
true: "true";
|
|
5826
|
+
}>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
|
|
5787
5827
|
}, z$1.core.$strip>;
|
|
5788
5828
|
readonly get_health_chains: z$1.ZodObject<{
|
|
5789
5829
|
strict: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodEnum<{
|
|
5790
5830
|
0: "0";
|
|
5791
5831
|
1: "1";
|
|
5792
|
-
true: "true";
|
|
5793
5832
|
false: "false";
|
|
5794
|
-
|
|
5833
|
+
true: "true";
|
|
5834
|
+
}>, z$1.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
|
|
5795
5835
|
}, z$1.core.$strip>;
|
|
5796
5836
|
readonly get_config_contracts: z$1.ZodObject<{
|
|
5797
5837
|
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -5802,11 +5842,11 @@ declare const schemas: {
|
|
|
5802
5842
|
cursor: z$1.ZodOptional<z$1.ZodString>;
|
|
5803
5843
|
limit: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<number, string>>, z$1.ZodNumber>>>;
|
|
5804
5844
|
types: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodTransform<{} | null | undefined, unknown>, z$1.ZodArray<z$1.ZodEnum<{
|
|
5805
|
-
|
|
5845
|
+
oracle: "oracle";
|
|
5806
5846
|
maturity: "maturity";
|
|
5807
5847
|
callback: "callback";
|
|
5848
|
+
loan_token: "loan_token";
|
|
5808
5849
|
collateral_token: "collateral_token";
|
|
5809
|
-
oracle: "oracle";
|
|
5810
5850
|
min_duration: "min_duration";
|
|
5811
5851
|
max_collaterals: "max_collaterals";
|
|
5812
5852
|
group_consistency: "group_consistency";
|
|
@@ -6246,7 +6286,7 @@ declare class HttpGetApiFailedError extends BaseError {
|
|
|
6246
6286
|
}
|
|
6247
6287
|
//#endregion
|
|
6248
6288
|
//#region src/database/drizzle/VERSION.d.ts
|
|
6249
|
-
declare const VERSION: "router_v1.
|
|
6289
|
+
declare const VERSION: "router_v1.16";
|
|
6250
6290
|
//#endregion
|
|
6251
6291
|
//#region src/database/drizzle/schema.d.ts
|
|
6252
6292
|
declare enum EnumTableName {
|
|
@@ -6272,12 +6312,12 @@ declare enum EnumTableName {
|
|
|
6272
6312
|
MERKLE_PATHS = "merkle_paths"
|
|
6273
6313
|
}
|
|
6274
6314
|
declare const TABLE_NAMES: readonly EnumTableName[];
|
|
6275
|
-
declare const VERSIONED_TABLE_NAMES: ("\"router_v1.
|
|
6315
|
+
declare const VERSIONED_TABLE_NAMES: ("\"router_v1.16\".\"obligations\"" | "\"router_v1.16\".\"obligation_id_keys\"" | "\"router_v1.16\".\"groups\"" | "\"router_v1.16\".\"consumed_events\"" | "\"router_v1.16\".\"obligation_collaterals_v2\"" | "\"router_v1.16\".\"oracles\"" | "\"router_v1.16\".\"offers\"" | "\"router_v1.16\".\"offers_callbacks\"" | "\"router_v1.16\".\"callbacks\"" | "\"router_v1.16\".\"positions\"" | "\"router_v1.16\".\"transfers\"" | "\"router_v1.16\".\"validations\"" | "\"router_v1.16\".\"collectors\"" | "\"router_v1.16\".\"chains\"" | "\"router_v1.16\".\"pending_links\"" | "\"router_v1.16\".\"lots\"" | "\"router_v1.16\".\"lots_positions\"" | "\"router_v1.16\".\"offsets\"" | "\"router_v1.16\".\"trees\"" | "\"router_v1.16\".\"merkle_paths\"")[];
|
|
6276
6316
|
type TableName = (typeof TABLE_NAMES)[number];
|
|
6277
6317
|
type VersionedTableName = `"${typeof VERSION}"."${TableName}"`;
|
|
6278
6318
|
declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6279
6319
|
name: EnumTableName.OBLIGATIONS;
|
|
6280
|
-
schema: "router_v1.
|
|
6320
|
+
schema: "router_v1.16";
|
|
6281
6321
|
columns: {
|
|
6282
6322
|
obligationKey: drizzle_orm_pg_core0.PgColumn<{
|
|
6283
6323
|
name: "obligation_key";
|
|
@@ -6356,7 +6396,7 @@ declare const obligations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6356
6396
|
}>;
|
|
6357
6397
|
declare const obligationIdKeys: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6358
6398
|
name: EnumTableName.OBLIGATION_ID_KEYS;
|
|
6359
|
-
schema: "router_v1.
|
|
6399
|
+
schema: "router_v1.16";
|
|
6360
6400
|
columns: {
|
|
6361
6401
|
obligationId: drizzle_orm_pg_core0.PgColumn<{
|
|
6362
6402
|
name: "obligation_id";
|
|
@@ -6439,7 +6479,7 @@ declare const obligationIdKeys: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6439
6479
|
}>;
|
|
6440
6480
|
declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6441
6481
|
name: EnumTableName.GROUPS;
|
|
6442
|
-
schema: "router_v1.
|
|
6482
|
+
schema: "router_v1.16";
|
|
6443
6483
|
columns: {
|
|
6444
6484
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6445
6485
|
name: "chain_id";
|
|
@@ -6554,7 +6594,7 @@ declare const groups: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6554
6594
|
}>;
|
|
6555
6595
|
declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6556
6596
|
name: EnumTableName.CONSUMED_EVENTS;
|
|
6557
|
-
schema: "router_v1.
|
|
6597
|
+
schema: "router_v1.16";
|
|
6558
6598
|
columns: {
|
|
6559
6599
|
eventId: drizzle_orm_pg_core0.PgColumn<{
|
|
6560
6600
|
name: "event_id";
|
|
@@ -6688,7 +6728,7 @@ declare const consumedEvents: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6688
6728
|
}>;
|
|
6689
6729
|
declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6690
6730
|
name: EnumTableName.OBLIGATION_COLLATERALS_V2;
|
|
6691
|
-
schema: "router_v1.
|
|
6731
|
+
schema: "router_v1.16";
|
|
6692
6732
|
columns: {
|
|
6693
6733
|
obligationKey: drizzle_orm_pg_core0.PgColumn<{
|
|
6694
6734
|
name: "obligation_key";
|
|
@@ -6820,7 +6860,7 @@ declare const obligationCollateralsV2: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6820
6860
|
}>;
|
|
6821
6861
|
declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6822
6862
|
name: EnumTableName.ORACLES;
|
|
6823
|
-
schema: "router_v1.
|
|
6863
|
+
schema: "router_v1.16";
|
|
6824
6864
|
columns: {
|
|
6825
6865
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
6826
6866
|
name: "chain_id";
|
|
@@ -6916,7 +6956,7 @@ declare const oracles: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6916
6956
|
}>;
|
|
6917
6957
|
declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
6918
6958
|
name: EnumTableName.OFFERS;
|
|
6919
|
-
schema: "router_v1.
|
|
6959
|
+
schema: "router_v1.16";
|
|
6920
6960
|
columns: {
|
|
6921
6961
|
hash: drizzle_orm_pg_core0.PgColumn<{
|
|
6922
6962
|
name: "hash";
|
|
@@ -6956,8 +6996,8 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
6956
6996
|
}, {}, {
|
|
6957
6997
|
length: 66;
|
|
6958
6998
|
}>;
|
|
6959
|
-
|
|
6960
|
-
name: "
|
|
6999
|
+
maxUnits: drizzle_orm_pg_core0.PgColumn<{
|
|
7000
|
+
name: "max_units";
|
|
6961
7001
|
tableName: EnumTableName.OFFERS;
|
|
6962
7002
|
dataType: "string";
|
|
6963
7003
|
columnType: "PgNumeric";
|
|
@@ -7245,7 +7285,7 @@ declare const offers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7245
7285
|
}>;
|
|
7246
7286
|
declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7247
7287
|
name: EnumTableName.OFFERS_CALLBACKS;
|
|
7248
|
-
schema: "router_v1.
|
|
7288
|
+
schema: "router_v1.16";
|
|
7249
7289
|
columns: {
|
|
7250
7290
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
7251
7291
|
name: "offer_hash";
|
|
@@ -7310,7 +7350,7 @@ declare const offersCallbacks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7310
7350
|
declare const CallbackTypes: drizzle_orm_pg_core0.PgEnum<[CallbackType, ...CallbackType[]]>;
|
|
7311
7351
|
declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7312
7352
|
name: EnumTableName.CALLBACKS;
|
|
7313
|
-
schema: "router_v1.
|
|
7353
|
+
schema: "router_v1.16";
|
|
7314
7354
|
columns: {
|
|
7315
7355
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
7316
7356
|
name: "id";
|
|
@@ -7427,7 +7467,7 @@ declare const callbacks$1: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7427
7467
|
}>;
|
|
7428
7468
|
declare const lotsPositions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7429
7469
|
name: EnumTableName.LOTS_POSITIONS;
|
|
7430
|
-
schema: "router_v1.
|
|
7470
|
+
schema: "router_v1.16";
|
|
7431
7471
|
columns: {
|
|
7432
7472
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7433
7473
|
name: "chain_id";
|
|
@@ -7508,7 +7548,7 @@ declare const lotsPositions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7508
7548
|
}>;
|
|
7509
7549
|
declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7510
7550
|
name: EnumTableName.LOTS;
|
|
7511
|
-
schema: "router_v1.
|
|
7551
|
+
schema: "router_v1.16";
|
|
7512
7552
|
columns: {
|
|
7513
7553
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7514
7554
|
name: "chain_id";
|
|
@@ -7644,7 +7684,7 @@ declare const lots: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7644
7684
|
}>;
|
|
7645
7685
|
declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7646
7686
|
name: EnumTableName.OFFSETS;
|
|
7647
|
-
schema: "router_v1.
|
|
7687
|
+
schema: "router_v1.16";
|
|
7648
7688
|
columns: {
|
|
7649
7689
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7650
7690
|
name: "chain_id";
|
|
@@ -7764,7 +7804,7 @@ declare const offsets: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7764
7804
|
declare const PositionTypes: drizzle_orm_pg_core0.PgEnum<[Type, ...Type[]]>;
|
|
7765
7805
|
declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7766
7806
|
name: "position_types";
|
|
7767
|
-
schema: "router_v1.
|
|
7807
|
+
schema: "router_v1.16";
|
|
7768
7808
|
columns: {
|
|
7769
7809
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
7770
7810
|
name: "id";
|
|
@@ -7805,7 +7845,7 @@ declare const positionTypes: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7805
7845
|
}>;
|
|
7806
7846
|
declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7807
7847
|
name: EnumTableName.POSITIONS;
|
|
7808
|
-
schema: "router_v1.
|
|
7848
|
+
schema: "router_v1.16";
|
|
7809
7849
|
columns: {
|
|
7810
7850
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
7811
7851
|
name: "chain_id";
|
|
@@ -7956,7 +7996,7 @@ declare const positions: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
7956
7996
|
}>;
|
|
7957
7997
|
declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
7958
7998
|
name: EnumTableName.TRANSFERS;
|
|
7959
|
-
schema: "router_v1.
|
|
7999
|
+
schema: "router_v1.16";
|
|
7960
8000
|
columns: {
|
|
7961
8001
|
eventId: drizzle_orm_pg_core0.PgColumn<{
|
|
7962
8002
|
name: "event_id";
|
|
@@ -8146,7 +8186,7 @@ declare const transfers: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8146
8186
|
declare const StatusCode: drizzle_orm_pg_core0.PgEnum<[Status, ...Status[]]>;
|
|
8147
8187
|
declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8148
8188
|
name: "status";
|
|
8149
|
-
schema: "router_v1.
|
|
8189
|
+
schema: "router_v1.16";
|
|
8150
8190
|
columns: {
|
|
8151
8191
|
id: drizzle_orm_pg_core0.PgColumn<{
|
|
8152
8192
|
name: "id";
|
|
@@ -8187,7 +8227,7 @@ declare const status: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8187
8227
|
}>;
|
|
8188
8228
|
declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8189
8229
|
name: "validations";
|
|
8190
|
-
schema: "router_v1.
|
|
8230
|
+
schema: "router_v1.16";
|
|
8191
8231
|
columns: {
|
|
8192
8232
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
8193
8233
|
name: "offer_hash";
|
|
@@ -8266,7 +8306,7 @@ declare const validations: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8266
8306
|
}>;
|
|
8267
8307
|
declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8268
8308
|
name: EnumTableName.COLLECTORS;
|
|
8269
|
-
schema: "router_v1.
|
|
8309
|
+
schema: "router_v1.16";
|
|
8270
8310
|
columns: {
|
|
8271
8311
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
8272
8312
|
name: "chain_id";
|
|
@@ -8362,7 +8402,7 @@ declare const collectors: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8362
8402
|
}>;
|
|
8363
8403
|
declare const chains: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8364
8404
|
name: EnumTableName.CHAINS;
|
|
8365
|
-
schema: "router_v1.
|
|
8405
|
+
schema: "router_v1.16";
|
|
8366
8406
|
columns: {
|
|
8367
8407
|
chainId: drizzle_orm_pg_core0.PgColumn<{
|
|
8368
8408
|
name: "chain_id";
|
|
@@ -8507,7 +8547,7 @@ declare const chains: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8507
8547
|
}>;
|
|
8508
8548
|
declare const pendingLinks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8509
8549
|
name: EnumTableName.PENDING_LINKS;
|
|
8510
|
-
schema: "router_v1.
|
|
8550
|
+
schema: "router_v1.16";
|
|
8511
8551
|
columns: {
|
|
8512
8552
|
key: drizzle_orm_pg_core0.PgColumn<{
|
|
8513
8553
|
name: "key";
|
|
@@ -8796,7 +8836,7 @@ declare const pendingLinks: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8796
8836
|
}>;
|
|
8797
8837
|
declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8798
8838
|
name: EnumTableName.TREES;
|
|
8799
|
-
schema: "router_v1.
|
|
8839
|
+
schema: "router_v1.16";
|
|
8800
8840
|
columns: {
|
|
8801
8841
|
root: drizzle_orm_pg_core0.PgColumn<{
|
|
8802
8842
|
name: "root";
|
|
@@ -8858,7 +8898,7 @@ declare const trees: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
|
8858
8898
|
}>;
|
|
8859
8899
|
declare const merklePaths: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
8860
8900
|
name: EnumTableName.MERKLE_PATHS;
|
|
8861
|
-
schema: "router_v1.
|
|
8901
|
+
schema: "router_v1.16";
|
|
8862
8902
|
columns: {
|
|
8863
8903
|
offerHash: drizzle_orm_pg_core0.PgColumn<{
|
|
8864
8904
|
name: "offer_hash";
|
|
@@ -9044,14 +9084,14 @@ declare const maxCollaterals: ({
|
|
|
9044
9084
|
max: number;
|
|
9045
9085
|
}) => Rule<Offer, "max_collaterals">;
|
|
9046
9086
|
/**
|
|
9047
|
-
* A validation rule that checks if the offer's
|
|
9087
|
+
* A validation rule that checks if the offer's maxUnits is non-zero.
|
|
9048
9088
|
* The contract requires a positive amount; this rule rejects early.
|
|
9049
9089
|
* @returns The issue that was found. If the offer is valid, this will be undefined.
|
|
9050
9090
|
*/
|
|
9051
9091
|
declare const amountNonZero: () => Rule<Offer, "amount_non_zero">;
|
|
9052
9092
|
/**
|
|
9053
9093
|
* A batch validation rule that ensures all offers within the same group are consistent.
|
|
9054
|
-
* All offers sharing the same group must have the same loan token,
|
|
9094
|
+
* All offers sharing the same group must have the same loan token, maxUnits,
|
|
9055
9095
|
* and side (buy/sell). The contract tracks consumed per group and requires these to match.
|
|
9056
9096
|
*/
|
|
9057
9097
|
declare const groupConsistency: () => Rule<Offer, "group_consistency">;
|