Skip to content

Commit

Permalink
[TRA-165] Update withdrawal gating E2E test for isolated subaccounts. (
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentwschau authored Mar 27, 2024
1 parent 045a112 commit 7492e0e
Show file tree
Hide file tree
Showing 3 changed files with 264 additions and 51 deletions.
7 changes: 7 additions & 0 deletions protocol/testutil/constants/orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,13 @@ var (
Subticks: 50_000_000_000,
GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 12},
}
Order_Dave_Num0_Id1_Clob3_Sell025ISO_Price50_GTB11 = clobtypes.Order{
OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 1, ClobPairId: 3},
Side: clobtypes.Order_SIDE_SELL,
Quantums: 250_000_000,
Subticks: 5_000_000,
GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 11},
}
Order_Dave_Num0_Id2_Clob0_Sell025BTC_Price50000_GTB12 = clobtypes.Order{
OrderId: clobtypes.OrderId{SubaccountId: Dave_Num0, ClientId: 2, ClobPairId: 0},
Side: clobtypes.Order_SIDE_SELL,
Expand Down
16 changes: 16 additions & 0 deletions protocol/testutil/constants/subaccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,22 @@ var (
},
},
}
Dave_Num0_1ISO_Long_50USD_Short = satypes.Subaccount{
Id: &Dave_Num0,
AssetPositions: []*satypes.AssetPosition{
{
AssetId: 0,
Quantums: dtypes.NewInt(-50_000_000), // -$50
},
},
PerpetualPositions: []*satypes.PerpetualPosition{
{
PerpetualId: 3,
Quantums: dtypes.NewInt(1_000_000_000), // 1 ISO
FundingIndex: dtypes.NewInt(0),
},
},
}
Dave_Num0_1ISO2_Short_499USD = satypes.Subaccount{
Id: &Dave_Num0,
AssetPositions: []*satypes.AssetPosition{
Expand Down
Loading

0 comments on commit 7492e0e

Please sign in to comment.