Skip to content

Commit

Permalink
fix tests for auction params
Browse files Browse the repository at this point in the history
  • Loading branch information
edkim committed Jan 11, 2024
1 parent d87356f commit d9ae3a7
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions test/proposeRebalance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,49 +247,48 @@ describe("Calculate dsETH auction rebalance params", function () {

const expectedOldComponentsAuctionParams = [
{
targetUnit: utils.parseEther("0.183524947187164250"),
targetUnit: BigNumber.from("183524947187164250"),
priceAdapterName: "BoundedStepwiseLinearPriceAdapter",
priceAdapterConfigData:
"0x0000000000000000000000000000000000dffbc1bd871e47d23ab9f3ff4800000000000000000000000000000000000000000e31690b80b45bbe3d82e9710000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000dffbc1bd871e47d23ab9f3ff4800000000000000000000000000000000000000db8c50e9eee5eb26c7810b0bf80000",
"0x000000000000000000000000000000000000000000000000101e622c74c4e3a80000000000000000000000000000000000000000000000000000e35fa931a00000000000000000000000000000000000000000000000000000000000000002580000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000101e622c74c4e3a80000000000000000000000000000000000000000000000000fd754479542e3a8",
},
{
targetUnit: utils.parseEther("0.137182714490521918"),
targetUnit: BigNumber.from("137182714490521918"),
priceAdapterName: "BoundedStepwiseLinearPriceAdapter",
priceAdapterConfigData:
"0x0000000000000000000000000000000000d4f3aa0c691d6e60873e24f04600000000000000000000000000000000000000000d7e753b155c9b049889c47ec000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000d4f3aa0c691d6e60873e24f04600000000000000000000000000000000000000d0bc2569f2707def17931788aa0000",
"0x0000000000000000000000000000000000000000000000000f54e6a808f3674e0000000000000000000000000000000000000000000000000000e35fa931a000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000f54e6a808f3674e0000000000000000000000000000000000000000000000000f0dd8c32971674e",
},
{
targetUnit: utils.parseEther("0.149549408574172648"),
targetUnit: BigNumber.from("149549408574172648"),
priceAdapterName: "BoundedStepwiseLinearPriceAdapter",
priceAdapterConfigData:
"0x0000000000000000000000000000000000c3579942011da1106dcee0845600000000000000000000000000000000000000000c60cc5f6e131cf6653f4b90c000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000c3579942011da1106dcee0845600000000000000000000000000000000000000bf7959642eb7a8036e2b18e71a0000",
"0x0000000000000000000000000000000000000000000000000e1346e1c7a9361e0000000000000000000000000000000000000000000000000000e35fa931a000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000e1346e1c7a9361e0000000000000000000000000000000000000000000000000dcc38fce827361e",
},
{
targetUnit: utils.parseEther("0.140236634011607713"),
targetUnit: BigNumber.from("140236634011607713"),
priceAdapterName: "BoundedStepwiseLinearPriceAdapter",
priceAdapterConfigData:
"0x0000000000000000000000000000000000d0507b6078c646dafc8c5df3c200000000000000000000000000000000000000000d333b04979f1129c1ef8c4a4000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000d0507b6078c646dafc8c5df3c200000000000000000000000000000000000000cc3078ef0964917deff1821c8e0000",
"0x0000000000000000000000000000000000000000000000000f0033d61974121a0000000000000000000000000000000000000000000000000000e35fa931a000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000f0033d61974121a0000000000000000000000000000000000000000000000000eb925f139f2121a",
},
];

const expectedNewComponentsAuctionParams = [
{
targetUnit: utils.parseEther("0.143389172227472443"),
targetUnit: BigNumber.from("143389172227472443"),
priceAdapterName: "BoundedStepwiseLinearPriceAdapter",
priceAdapterConfigData:
"0x0000000000000000000000000000000000c7b33737f44df5ee5f5cf42ad7000000000000000000000000000000000000000000c64bcdd2e60cfe614efdc83000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cbbc0207f411799b44d85df2d100000000000000000000000000000000000000c7b33737f44df5ee5f5cf42ad70000",
"0x0000000000000000000000000000000000000000000000000e657fc19720033d00000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eac8da676a2033d0000000000000000000000000000000000000000000000000e657fc19720033d",
},
{
targetUnit: utils.parseEther("0.223325247302630300"),
targetUnit: BigNumber.from("223325247302630300"),
priceAdapterName: "BoundedStepwiseLinearPriceAdapter",
priceAdapterConfigData:
"0x0000000000000000000000000000000000c21c00f4eebf00ab3b2e5b73e4000000000000000000000000000000000000000000c0bea76586bace15b3d8634000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c607e1f21f8762f1ec370d237c00000000000000000000000000000000000000c21c00f4eebf00ab3b2e5b73e40000",
"0x0000000000000000000000000000000000000000000000000dfd53e06d994acc00000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000025800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4461c54d1b4acc0000000000000000000000000000000000000000000000000dfd53e06d994acc",
},
];

it("Should return the correct values", async function () {
const targetUnits = await dsEthProposer.getTargetUnits();

const proposeRebalanceParams =
await dsEthProposer.getProposeRebalanceParams(targetUnits);

Expand Down

0 comments on commit d9ae3a7

Please sign in to comment.