Skip to content

Commit

Permalink
[TRA-99] Add E2E test for isolated subaccounts having order matches /…
Browse files Browse the repository at this point in the history
… placing orders. (#1255)
  • Loading branch information
vincentwschau authored Mar 27, 2024
1 parent 7669b1e commit 2f6fffc
Show file tree
Hide file tree
Showing 2 changed files with 507 additions and 1 deletion.
15 changes: 14 additions & 1 deletion protocol/testutil/constants/subaccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ var (
},
PerpetualPositions: nil,
}
Alice_Num0_1BTC_LONG_10_000USD = satypes.Subaccount{
Id: &Alice_Num0,
AssetPositions: []*satypes.AssetPosition{
&Usdc_Asset_10_000,
},
PerpetualPositions: []*satypes.PerpetualPosition{
{
PerpetualId: 1,
Quantums: dtypes.NewInt(100_000_000), // 1 BTC
FundingIndex: dtypes.NewInt(0),
},
},
}
Alice_Num0_1ISO_LONG_10_000USD = satypes.Subaccount{
Id: &Alice_Num0,
AssetPositions: []*satypes.AssetPosition{
Expand Down Expand Up @@ -96,7 +109,7 @@ var (
PerpetualPositions: []*satypes.PerpetualPosition{
{
PerpetualId: 3,
Quantums: dtypes.NewInt(10_000_000), // 1 ISO2
Quantums: dtypes.NewInt(1_000_000_000), // 1 ISO
FundingIndex: dtypes.NewInt(0),
},
},
Expand Down
Loading

0 comments on commit 2f6fffc

Please sign in to comment.