-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add switch to turn PML on/off via governance
Signed-off-by: Shrenuj Bansal <[email protected]>
- Loading branch information
Showing
30 changed files
with
1,727 additions
and
483 deletions.
There are no files selected for viewing
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
20 changes: 18 additions & 2 deletions
20
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.rpc.Query.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 |
---|---|---|
@@ -1,18 +1,34 @@ | ||
import { Rpc } from "../../helpers"; | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; | ||
import { QueryPermissionlessMarketListingStatus, QueryPermissionlessMarketListingStatusResponse } from "./query"; | ||
/** Query defines the gRPC querier service. */ | ||
|
||
export interface Query {} | ||
export interface Query { | ||
permissionlessMarketListingStatus(request?: QueryPermissionlessMarketListingStatus): Promise<QueryPermissionlessMarketListingStatusResponse>; | ||
} | ||
export class QueryClientImpl implements Query { | ||
private readonly rpc: Rpc; | ||
|
||
constructor(rpc: Rpc) { | ||
this.rpc = rpc; | ||
this.permissionlessMarketListingStatus = this.permissionlessMarketListingStatus.bind(this); | ||
} | ||
|
||
permissionlessMarketListingStatus(request: QueryPermissionlessMarketListingStatus = {}): Promise<QueryPermissionlessMarketListingStatusResponse> { | ||
const data = QueryPermissionlessMarketListingStatus.encode(request).finish(); | ||
const promise = this.rpc.request("dydxprotocol.listing.Query", "PermissionlessMarketListingStatus", data); | ||
return promise.then(data => QueryPermissionlessMarketListingStatusResponse.decode(new _m0.Reader(data))); | ||
} | ||
|
||
} | ||
export const createRpcQueryExtension = (base: QueryClient) => { | ||
const rpc = createProtobufRpcClient(base); | ||
const queryService = new QueryClientImpl(rpc); | ||
return {}; | ||
return { | ||
permissionlessMarketListingStatus(request?: QueryPermissionlessMarketListingStatus): Promise<QueryPermissionlessMarketListingStatusResponse> { | ||
return queryService.permissionlessMarketListingStatus(request); | ||
} | ||
|
||
}; | ||
}; |
98 changes: 97 additions & 1 deletion
98
indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.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 |
---|---|---|
@@ -1 +1,97 @@ | ||
export {} | ||
import * as _m0 from "protobufjs/minimal"; | ||
import { DeepPartial } from "../../helpers"; | ||
/** Queries if permissionless listings are enabled */ | ||
|
||
export interface QueryPermissionlessMarketListingStatus {} | ||
/** Queries if permissionless listings are enabled */ | ||
|
||
export interface QueryPermissionlessMarketListingStatusSDKType {} | ||
/** Response type indicating if permissionless listings are enabled */ | ||
|
||
export interface QueryPermissionlessMarketListingStatusResponse { | ||
enabled: boolean; | ||
} | ||
/** Response type indicating if permissionless listings are enabled */ | ||
|
||
export interface QueryPermissionlessMarketListingStatusResponseSDKType { | ||
enabled: boolean; | ||
} | ||
|
||
function createBaseQueryPermissionlessMarketListingStatus(): QueryPermissionlessMarketListingStatus { | ||
return {}; | ||
} | ||
|
||
export const QueryPermissionlessMarketListingStatus = { | ||
encode(_: QueryPermissionlessMarketListingStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
return writer; | ||
}, | ||
|
||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryPermissionlessMarketListingStatus { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryPermissionlessMarketListingStatus(); | ||
|
||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
|
||
switch (tag >>> 3) { | ||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
|
||
return message; | ||
}, | ||
|
||
fromPartial(_: DeepPartial<QueryPermissionlessMarketListingStatus>): QueryPermissionlessMarketListingStatus { | ||
const message = createBaseQueryPermissionlessMarketListingStatus(); | ||
return message; | ||
} | ||
|
||
}; | ||
|
||
function createBaseQueryPermissionlessMarketListingStatusResponse(): QueryPermissionlessMarketListingStatusResponse { | ||
return { | ||
enabled: false | ||
}; | ||
} | ||
|
||
export const QueryPermissionlessMarketListingStatusResponse = { | ||
encode(message: QueryPermissionlessMarketListingStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { | ||
if (message.enabled === true) { | ||
writer.uint32(8).bool(message.enabled); | ||
} | ||
|
||
return writer; | ||
}, | ||
|
||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryPermissionlessMarketListingStatusResponse { | ||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); | ||
let end = length === undefined ? reader.len : reader.pos + length; | ||
const message = createBaseQueryPermissionlessMarketListingStatusResponse(); | ||
|
||
while (reader.pos < end) { | ||
const tag = reader.uint32(); | ||
|
||
switch (tag >>> 3) { | ||
case 1: | ||
message.enabled = reader.bool(); | ||
break; | ||
|
||
default: | ||
reader.skipType(tag & 7); | ||
break; | ||
} | ||
} | ||
|
||
return message; | ||
}, | ||
|
||
fromPartial(object: DeepPartial<QueryPermissionlessMarketListingStatusResponse>): QueryPermissionlessMarketListingStatusResponse { | ||
const message = createBaseQueryPermissionlessMarketListingStatusResponse(); | ||
message.enabled = object.enabled ?? false; | ||
return message; | ||
} | ||
|
||
}; |
Oops, something went wrong.