Skip to content

Commit

Permalink
chore(liquidationVisibility): Add new data fields
Browse files Browse the repository at this point in the history
TODO: Update bootstrap tests as well

Refs: #35 #36
  • Loading branch information
anilhelvaci committed Jul 15, 2024
1 parent 2093f0a commit 0fa050f
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/inter-protocol/src/vaultFactory/vaultManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ export const watchQuoteNotifier = async (notifierP, watcher, ...args) => {
* mintedProceeds?: Amount<'nat'>;
* collateralSold?: Amount<'nat'>;
* collateralRemaining?: Amount<'nat'>;
* debtToBurn?: Amount<'nat'>;
* mintedForReserve?: Amount<'nat'>;
* totalPenalty?: Amount<'nat'>;
* endTime?: import('@agoric/time/src/types.js').TimestampRecord | null;
* startTime?: import('@agoric/time/src/types.js').TimestampRecord | null;
* }} AuctionResultState
Expand Down Expand Up @@ -776,6 +779,9 @@ export const prepareVaultManagerKit = (
mintedProceeds: plan.mintedProceeds,
collateralSold: plan.collateralSold,
collateralRemaining: plan.collatRemaining,
debtToBurn: plan.debtToBurn,
mintedForReserve: plan.mintedForReserve,
totalPenalty: plan.totalPenalty,
// @ts-expect-error
endTime: auctionSchedule?.liveAuctionSchedule.endTime,
// @ts-expect-error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: aEth brand {},
value: 400n,
},
debtToBurn: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
},
endTime: {
absValue: 3614n,
timerBrand: Object @Alleged: timerBrand {},
Expand All @@ -39,6 +43,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
},
mintedForReserve: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 0n,
},
mintedProceeds: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
Expand All @@ -51,6 +59,10 @@ Generated by [AVA](https://avajs.dev).
absValue: 3610n,
timerBrand: Object @Alleged: timerBrand {},
},
totalPenalty: {
brand: Object @Alleged: aEth brand {},
value: 42n,
},
},
],
[
Expand Down Expand Up @@ -104,6 +116,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: aEth brand {},
value: 400n,
},
debtToBurn: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
},
endTime: {
absValue: 3614n,
timerBrand: Object @Alleged: timerBrand {},
Expand All @@ -112,6 +128,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
},
mintedForReserve: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 0n,
},
mintedProceeds: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
Expand All @@ -124,6 +144,10 @@ Generated by [AVA](https://avajs.dev).
absValue: 3610n,
timerBrand: Object @Alleged: timerBrand {},
},
totalPenalty: {
brand: Object @Alleged: aEth brand {},
value: 42n,
},
},
],
[
Expand Down Expand Up @@ -175,6 +199,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: aBtc brand {},
value: 400n,
},
debtToBurn: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
},
endTime: {
absValue: 3614n,
timerBrand: Object @Alleged: timerBrand {},
Expand All @@ -183,6 +211,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
},
mintedForReserve: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 0n,
},
mintedProceeds: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 1680n,
Expand All @@ -195,6 +227,10 @@ Generated by [AVA](https://avajs.dev).
absValue: 3610n,
timerBrand: Object @Alleged: timerBrand {},
},
totalPenalty: {
brand: Object @Alleged: aBtc brand {},
value: 42n,
},
},
],
[
Expand Down Expand Up @@ -248,6 +284,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: aEth brand {},
value: 700n,
},
debtToBurn: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 3185n,
},
endTime: {
absValue: 3614n,
timerBrand: Object @Alleged: timerBrand {},
Expand All @@ -256,6 +296,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: ZDEFAULT brand {},
value: 5250n,
},
mintedForReserve: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 0n,
},
mintedProceeds: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 3185n,
Expand All @@ -268,6 +312,10 @@ Generated by [AVA](https://avajs.dev).
absValue: 3610n,
timerBrand: Object @Alleged: timerBrand {},
},
totalPenalty: {
brand: Object @Alleged: aEth brand {},
value: 75n,
},
},
],
[
Expand Down Expand Up @@ -321,6 +369,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: aEth brand {},
value: 8n,
},
debtToBurn: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 258n,
},
endTime: {
absValue: 3614n,
timerBrand: Object @Alleged: timerBrand {},
Expand All @@ -329,6 +381,10 @@ Generated by [AVA](https://avajs.dev).
brand: Object @Alleged: ZDEFAULT brand {},
value: 258n,
},
mintedForReserve: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 0n,
},
mintedProceeds: {
brand: Object @Alleged: ZDEFAULT brand {},
value: 34n,
Expand All @@ -341,6 +397,10 @@ Generated by [AVA](https://avajs.dev).
absValue: 3610n,
timerBrand: Object @Alleged: timerBrand {},
},
totalPenalty: {
brand: Object @Alleged: aEth brand {},
value: 7n,
},
},
],
[
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ test('liq-flow-1', async t => {
collateralRemaining: aeth.makeEmpty(),
endTime,
startTime,
debtToBurn: run.make(1680n),
mintedForReserve: run.makeEmpty(),
totalPenalty: aeth.make(42n),
},
});

Expand Down Expand Up @@ -581,6 +584,9 @@ test('liq-flow-1.1', async t => {
collateralRemaining: aeth.makeEmpty(),
endTime,
startTime,
debtToBurn: run.make(1680n),
mintedForReserve: run.makeEmpty(),
totalPenalty: aeth.make(42n),
},
});

Expand All @@ -598,6 +604,9 @@ test('liq-flow-1.1', async t => {
collateralRemaining: abtc.makeEmpty(),
endTime,
startTime,
debtToBurn: run.make(1680n),
mintedForReserve: run.makeEmpty(),
totalPenalty: abtc.make(42n),
},
});

Expand Down Expand Up @@ -846,6 +855,9 @@ test('liq-flow-2a', async t => {
collateralRemaining: aeth.makeEmpty(),
endTime,
startTime: start1,
debtToBurn: run.make(3185n),
mintedForReserve: run.makeEmpty(),
totalPenalty: aeth.make(75n),
},
});

Expand Down Expand Up @@ -1114,6 +1126,9 @@ test('liq-flow-2b', async t => {
collateralRemaining: aeth.make(5n),
endTime,
startTime,
debtToBurn: run.make(258n),
mintedForReserve: run.makeEmpty(),
totalPenalty: aeth.make(7n),
},
});

Expand Down

0 comments on commit 0fa050f

Please sign in to comment.