-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make PML compatible with OE by staging in-memory CLOB side effe…
- Loading branch information
Showing
28 changed files
with
1,024 additions
and
414 deletions.
There are no files selected for viewing
516 changes: 259 additions & 257 deletions
516
indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts
Large diffs are not rendered by default.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/finalize_block.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,66 @@ | ||
import { ClobPair, ClobPairSDKType } from "./clob_pair"; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { DeepPartial } from "../../helpers"; | ||
/** | ||
* ClobStagedFinalizeBlockEvent defines a CLOB event staged during | ||
* FinalizeBlock. | ||
*/ | ||
|
||
export interface ClobStagedFinalizeBlockEvent { | ||
/** create_clob_pair indicates a new CLOB pair creation. */ | ||
createClobPair?: ClobPair; | ||
} | ||
/** | ||
* ClobStagedFinalizeBlockEvent defines a CLOB event staged during | ||
* FinalizeBlock. | ||
*/ | ||
|
||
export interface ClobStagedFinalizeBlockEventSDKType { | ||
/** create_clob_pair indicates a new CLOB pair creation. */ | ||
create_clob_pair?: ClobPairSDKType; | ||
} | ||
|
||
function createBaseClobStagedFinalizeBlockEvent(): ClobStagedFinalizeBlockEvent { | ||
return { | ||
createClobPair: undefined | ||
}; | ||
} | ||
|
||
export const ClobStagedFinalizeBlockEvent = { | ||
encode(message: ClobStagedFinalizeBlockEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.createClobPair !== undefined) { | ||
ClobPair.encode(message.createClobPair, writer.uint32(10).fork()).ldelim(); | ||
} | ||
|
||
return writer; | ||
}, | ||
|
||
decode(input: _m0.Reader | Uint8Array, length?: number): ClobStagedFinalizeBlockEvent { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseClobStagedFinalizeBlockEvent(); | ||
|
||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
|
||
switch (tag >>> 3) { | ||
case 1: | ||
message.createClobPair = ClobPair.decode(reader, reader.uint32()); | ||
break; | ||
|
||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
|
||
return message; | ||
}, | ||
|
||
fromPartial(object: DeepPartial<ClobStagedFinalizeBlockEvent>): ClobStagedFinalizeBlockEvent { | ||
const message = createBaseClobStagedFinalizeBlockEvent(); | ||
message.createClobPair = object.createClobPair !== undefined && object.createClobPair !== null ? ClobPair.fromPartial(object.createClobPair) : undefined; | ||
return message; | ||
} | ||
|
||
}; |
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 _128 from "./gogo"; | ||
export const gogoproto = { ..._128 | ||
import * as _129 from "./gogo"; | ||
export const gogoproto = { ..._129 | ||
}; |
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 _129 from "./api/annotations"; | ||
import * as _130 from "./api/http"; | ||
import * as _131 from "./protobuf/descriptor"; | ||
import * as _132 from "./protobuf/duration"; | ||
import * as _133 from "./protobuf/timestamp"; | ||
import * as _134 from "./protobuf/any"; | ||
import * as _130 from "./api/annotations"; | ||
import * as _131 from "./api/http"; | ||
import * as _132 from "./protobuf/descriptor"; | ||
import * as _133 from "./protobuf/duration"; | ||
import * as _134 from "./protobuf/timestamp"; | ||
import * as _135 from "./protobuf/any"; | ||
export namespace google { | ||
export const api = { ..._129, | ||
..._130 | ||
export const api = { ..._130, | ||
..._131 | ||
}; | ||
export const protobuf = { ..._131, | ||
..._132, | ||
export const protobuf = { ..._132, | ||
..._133, | ||
..._134 | ||
..._134, | ||
..._135 | ||
}; | ||
} |
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,16 @@ | ||
syntax = "proto3"; | ||
package dydxprotocol.clob; | ||
|
||
import "dydxprotocol/clob/clob_pair.proto"; | ||
|
||
option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/clob/types"; | ||
|
||
// ClobStagedFinalizeBlockEvent defines a CLOB event staged during | ||
// FinalizeBlock. | ||
message ClobStagedFinalizeBlockEvent { | ||
// event is the staged event. | ||
oneof event { | ||
// create_clob_pair indicates a new CLOB pair creation. | ||
ClobPair create_clob_pair = 1; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
Oops, something went wrong.