-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TRA-572] Add upsert vault event. (#2250)
- Loading branch information
1 parent
cbd23b1
commit 1c7884e
Showing
13 changed files
with
1,003 additions
and
365 deletions.
There are no files selected for viewing
410 changes: 206 additions & 204 deletions
410
indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/protocol/v1/vault.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/** VaultStatus represents the status of a vault. */ | ||
export enum VaultStatus { | ||
/** VAULT_STATUS_UNSPECIFIED - Default value, invalid and unused. */ | ||
VAULT_STATUS_UNSPECIFIED = 0, | ||
|
||
/** VAULT_STATUS_DEACTIVATED - Don’t place orders. Does not count toward global vault balances. */ | ||
VAULT_STATUS_DEACTIVATED = 1, | ||
|
||
/** VAULT_STATUS_STAND_BY - Don’t place orders. Does count towards global vault balances. */ | ||
VAULT_STATUS_STAND_BY = 2, | ||
|
||
/** VAULT_STATUS_QUOTING - Places orders on both sides of the book. */ | ||
VAULT_STATUS_QUOTING = 3, | ||
|
||
/** VAULT_STATUS_CLOSE_ONLY - Only place orders that close the position. */ | ||
VAULT_STATUS_CLOSE_ONLY = 4, | ||
UNRECOGNIZED = -1, | ||
} | ||
/** VaultStatus represents the status of a vault. */ | ||
|
||
export enum VaultStatusSDKType { | ||
/** VAULT_STATUS_UNSPECIFIED - Default value, invalid and unused. */ | ||
VAULT_STATUS_UNSPECIFIED = 0, | ||
|
||
/** VAULT_STATUS_DEACTIVATED - Don’t place orders. Does not count toward global vault balances. */ | ||
VAULT_STATUS_DEACTIVATED = 1, | ||
|
||
/** VAULT_STATUS_STAND_BY - Don’t place orders. Does count towards global vault balances. */ | ||
VAULT_STATUS_STAND_BY = 2, | ||
|
||
/** VAULT_STATUS_QUOTING - Places orders on both sides of the book. */ | ||
VAULT_STATUS_QUOTING = 3, | ||
|
||
/** VAULT_STATUS_CLOSE_ONLY - Only place orders that close the position. */ | ||
VAULT_STATUS_CLOSE_ONLY = 4, | ||
UNRECOGNIZED = -1, | ||
} | ||
export function vaultStatusFromJSON(object: any): VaultStatus { | ||
switch (object) { | ||
case 0: | ||
case "VAULT_STATUS_UNSPECIFIED": | ||
return VaultStatus.VAULT_STATUS_UNSPECIFIED; | ||
|
||
case 1: | ||
case "VAULT_STATUS_DEACTIVATED": | ||
return VaultStatus.VAULT_STATUS_DEACTIVATED; | ||
|
||
case 2: | ||
case "VAULT_STATUS_STAND_BY": | ||
return VaultStatus.VAULT_STATUS_STAND_BY; | ||
|
||
case 3: | ||
case "VAULT_STATUS_QUOTING": | ||
return VaultStatus.VAULT_STATUS_QUOTING; | ||
|
||
case 4: | ||
case "VAULT_STATUS_CLOSE_ONLY": | ||
return VaultStatus.VAULT_STATUS_CLOSE_ONLY; | ||
|
||
case -1: | ||
case "UNRECOGNIZED": | ||
default: | ||
return VaultStatus.UNRECOGNIZED; | ||
} | ||
} | ||
export function vaultStatusToJSON(object: VaultStatus): string { | ||
switch (object) { | ||
case VaultStatus.VAULT_STATUS_UNSPECIFIED: | ||
return "VAULT_STATUS_UNSPECIFIED"; | ||
|
||
case VaultStatus.VAULT_STATUS_DEACTIVATED: | ||
return "VAULT_STATUS_DEACTIVATED"; | ||
|
||
case VaultStatus.VAULT_STATUS_STAND_BY: | ||
return "VAULT_STATUS_STAND_BY"; | ||
|
||
case VaultStatus.VAULT_STATUS_QUOTING: | ||
return "VAULT_STATUS_QUOTING"; | ||
|
||
case VaultStatus.VAULT_STATUS_CLOSE_ONLY: | ||
return "VAULT_STATUS_CLOSE_ONLY"; | ||
|
||
case VaultStatus.UNRECOGNIZED: | ||
default: | ||
return "UNRECOGNIZED"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import * as _126 from "./gogo"; | ||
export const gogoproto = { ..._126 | ||
import * as _127 from "./gogo"; | ||
export const gogoproto = { ..._127 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import * as _127 from "./api/annotations"; | ||
import * as _128 from "./api/http"; | ||
import * as _129 from "./protobuf/descriptor"; | ||
import * as _130 from "./protobuf/duration"; | ||
import * as _131 from "./protobuf/timestamp"; | ||
import * as _132 from "./protobuf/any"; | ||
import * as _128 from "./api/annotations"; | ||
import * as _129 from "./api/http"; | ||
import * as _130 from "./protobuf/descriptor"; | ||
import * as _131 from "./protobuf/duration"; | ||
import * as _132 from "./protobuf/timestamp"; | ||
import * as _133 from "./protobuf/any"; | ||
export namespace google { | ||
export const api = { ..._127, | ||
..._128 | ||
export const api = { ..._128, | ||
..._129 | ||
}; | ||
export const protobuf = { ..._129, | ||
..._130, | ||
export const protobuf = { ..._130, | ||
..._131, | ||
..._132 | ||
..._132, | ||
..._133 | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
syntax = "proto3"; | ||
package dydxprotocol.indexer.protocol.v1; | ||
|
||
option go_package = "github.com/dydxprotocol/v4-chain/protocol/indexer/protocol/v1/types"; | ||
|
||
// Initial copy of protos from dYdX chain application state protos for the | ||
// vault module for use to send Indexer specific messages. Do not make any | ||
// breaking changes to these protos, a new version should be created if a | ||
// breaking change is needed. | ||
|
||
// VaultStatus represents the status of a vault. | ||
enum VaultStatus { | ||
// Default value, invalid and unused. | ||
VAULT_STATUS_UNSPECIFIED = 0; | ||
|
||
// Don’t place orders. Does not count toward global vault balances. | ||
VAULT_STATUS_DEACTIVATED = 1; | ||
|
||
// Don’t place orders. Does count towards global vault balances. | ||
VAULT_STATUS_STAND_BY = 2; | ||
|
||
// Places orders on both sides of the book. | ||
VAULT_STATUS_QUOTING = 3; | ||
|
||
// Only place orders that close the position. | ||
VAULT_STATUS_CLOSE_ONLY = 4; | ||
} |
Oops, something went wrong.