Skip to content

Commit

Permalink
[tra-87] add x/vault protos (#1169)
Browse files Browse the repository at this point in the history
* add x/vault protos
  • Loading branch information
tqin7 authored Mar 14, 2024
1 parent 7b100ac commit 20ffef4
Show file tree
Hide file tree
Showing 18 changed files with 1,685 additions and 126 deletions.
204 changes: 104 additions & 100 deletions indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,83 +90,85 @@ import * as _93 from "./subaccounts/subaccount";
import * as _94 from "./vault/genesis";
import * as _95 from "./vault/query";
import * as _96 from "./vault/tx";
import * as _97 from "./vest/genesis";
import * as _98 from "./vest/query";
import * as _99 from "./vest/tx";
import * as _100 from "./vest/vest_entry";
import * as _108 from "./assets/query.lcd";
import * as _109 from "./blocktime/query.lcd";
import * as _110 from "./bridge/query.lcd";
import * as _111 from "./clob/query.lcd";
import * as _112 from "./delaymsg/query.lcd";
import * as _113 from "./epochs/query.lcd";
import * as _114 from "./feetiers/query.lcd";
import * as _115 from "./perpetuals/query.lcd";
import * as _116 from "./prices/query.lcd";
import * as _117 from "./ratelimit/query.lcd";
import * as _118 from "./rewards/query.lcd";
import * as _119 from "./stats/query.lcd";
import * as _120 from "./subaccounts/query.lcd";
import * as _121 from "./vest/query.lcd";
import * as _122 from "./assets/query.rpc.Query";
import * as _123 from "./blocktime/query.rpc.Query";
import * as _124 from "./bridge/query.rpc.Query";
import * as _125 from "./clob/query.rpc.Query";
import * as _126 from "./delaymsg/query.rpc.Query";
import * as _127 from "./epochs/query.rpc.Query";
import * as _128 from "./feetiers/query.rpc.Query";
import * as _129 from "./govplus/query.rpc.Query";
import * as _130 from "./perpetuals/query.rpc.Query";
import * as _131 from "./prices/query.rpc.Query";
import * as _132 from "./ratelimit/query.rpc.Query";
import * as _133 from "./rewards/query.rpc.Query";
import * as _134 from "./sending/query.rpc.Query";
import * as _135 from "./stats/query.rpc.Query";
import * as _136 from "./subaccounts/query.rpc.Query";
import * as _137 from "./vault/query.rpc.Query";
import * as _138 from "./vest/query.rpc.Query";
import * as _139 from "./blocktime/tx.rpc.msg";
import * as _140 from "./bridge/tx.rpc.msg";
import * as _141 from "./clob/tx.rpc.msg";
import * as _142 from "./delaymsg/tx.rpc.msg";
import * as _143 from "./feetiers/tx.rpc.msg";
import * as _144 from "./govplus/tx.rpc.msg";
import * as _145 from "./perpetuals/tx.rpc.msg";
import * as _146 from "./prices/tx.rpc.msg";
import * as _147 from "./ratelimit/tx.rpc.msg";
import * as _148 from "./rewards/tx.rpc.msg";
import * as _149 from "./sending/tx.rpc.msg";
import * as _150 from "./stats/tx.rpc.msg";
import * as _151 from "./vest/tx.rpc.msg";
import * as _152 from "./lcd";
import * as _153 from "./rpc.query";
import * as _154 from "./rpc.tx";
import * as _97 from "./vault/vault";
import * as _98 from "./vest/genesis";
import * as _99 from "./vest/query";
import * as _100 from "./vest/tx";
import * as _101 from "./vest/vest_entry";
import * as _109 from "./assets/query.lcd";
import * as _110 from "./blocktime/query.lcd";
import * as _111 from "./bridge/query.lcd";
import * as _112 from "./clob/query.lcd";
import * as _113 from "./delaymsg/query.lcd";
import * as _114 from "./epochs/query.lcd";
import * as _115 from "./feetiers/query.lcd";
import * as _116 from "./perpetuals/query.lcd";
import * as _117 from "./prices/query.lcd";
import * as _118 from "./ratelimit/query.lcd";
import * as _119 from "./rewards/query.lcd";
import * as _120 from "./stats/query.lcd";
import * as _121 from "./subaccounts/query.lcd";
import * as _122 from "./vest/query.lcd";
import * as _123 from "./assets/query.rpc.Query";
import * as _124 from "./blocktime/query.rpc.Query";
import * as _125 from "./bridge/query.rpc.Query";
import * as _126 from "./clob/query.rpc.Query";
import * as _127 from "./delaymsg/query.rpc.Query";
import * as _128 from "./epochs/query.rpc.Query";
import * as _129 from "./feetiers/query.rpc.Query";
import * as _130 from "./govplus/query.rpc.Query";
import * as _131 from "./perpetuals/query.rpc.Query";
import * as _132 from "./prices/query.rpc.Query";
import * as _133 from "./ratelimit/query.rpc.Query";
import * as _134 from "./rewards/query.rpc.Query";
import * as _135 from "./sending/query.rpc.Query";
import * as _136 from "./stats/query.rpc.Query";
import * as _137 from "./subaccounts/query.rpc.Query";
import * as _138 from "./vault/query.rpc.Query";
import * as _139 from "./vest/query.rpc.Query";
import * as _140 from "./blocktime/tx.rpc.msg";
import * as _141 from "./bridge/tx.rpc.msg";
import * as _142 from "./clob/tx.rpc.msg";
import * as _143 from "./delaymsg/tx.rpc.msg";
import * as _144 from "./feetiers/tx.rpc.msg";
import * as _145 from "./govplus/tx.rpc.msg";
import * as _146 from "./perpetuals/tx.rpc.msg";
import * as _147 from "./prices/tx.rpc.msg";
import * as _148 from "./ratelimit/tx.rpc.msg";
import * as _149 from "./rewards/tx.rpc.msg";
import * as _150 from "./sending/tx.rpc.msg";
import * as _151 from "./stats/tx.rpc.msg";
import * as _152 from "./vault/tx.rpc.msg";
import * as _153 from "./vest/tx.rpc.msg";
import * as _154 from "./lcd";
import * as _155 from "./rpc.query";
import * as _156 from "./rpc.tx";
export namespace dydxprotocol {
export const assets = { ..._5,
..._6,
..._7,
..._8,
..._108,
..._122
..._109,
..._123
};
export const blocktime = { ..._9,
..._10,
..._11,
..._12,
..._13,
..._109,
..._123,
..._139
..._110,
..._124,
..._140
};
export const bridge = { ..._14,
..._15,
..._16,
..._17,
..._18,
..._19,
..._110,
..._124,
..._140
..._111,
..._125,
..._141
};
export const clob = { ..._20,
..._21,
Expand All @@ -182,9 +184,9 @@ export namespace dydxprotocol {
..._31,
..._32,
..._33,
..._111,
..._125,
..._141
..._112,
..._126,
..._142
};
export namespace daemons {
export const bridge = { ..._34
Expand All @@ -199,29 +201,29 @@ export namespace dydxprotocol {
..._39,
..._40,
..._41,
..._112,
..._126,
..._142
..._113,
..._127,
..._143
};
export const epochs = { ..._42,
..._43,
..._44,
..._113,
..._127
..._114,
..._128
};
export const feetiers = { ..._45,
..._46,
..._47,
..._48,
..._114,
..._128,
..._143
..._115,
..._129,
..._144
};
export const govplus = { ..._49,
..._50,
..._51,
..._129,
..._144
..._130,
..._145
};
export namespace indexer {
export const events = { ..._52
Expand All @@ -247,76 +249,78 @@ export namespace dydxprotocol {
..._62,
..._63,
..._64,
..._115,
..._130,
..._145
..._116,
..._131,
..._146
};
export const prices = { ..._65,
..._66,
..._67,
..._68,
..._69,
..._116,
..._131,
..._146
..._117,
..._132,
..._147
};
export const ratelimit = { ..._70,
..._71,
..._72,
..._73,
..._74,
..._117,
..._132,
..._147
..._118,
..._133,
..._148
};
export const rewards = { ..._75,
..._76,
..._77,
..._78,
..._79,
..._118,
..._133,
..._148
..._119,
..._134,
..._149
};
export const sending = { ..._80,
..._81,
..._82,
..._83,
..._134,
..._149
..._135,
..._150
};
export const stats = { ..._84,
..._85,
..._86,
..._87,
..._88,
..._119,
..._135,
..._150
..._120,
..._136,
..._151
};
export const subaccounts = { ..._89,
..._90,
..._91,
..._92,
..._93,
..._120,
..._136
..._121,
..._137
};
export const vault = { ..._94,
..._95,
..._96,
..._137
..._97,
..._138,
..._152
};
export const vest = { ..._97,
..._98,
export const vest = { ..._98,
..._99,
..._100,
..._121,
..._138,
..._151
..._101,
..._122,
..._139,
..._153
};
export const ClientFactory = { ..._152,
..._153,
..._154
export const ClientFactory = { ..._154,
..._155,
..._156
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const createRPCMsgClient = async ({
rewards: new (await import("./rewards/tx.rpc.msg")).MsgClientImpl(rpc),
sending: new (await import("./sending/tx.rpc.msg")).MsgClientImpl(rpc),
stats: new (await import("./stats/tx.rpc.msg")).MsgClientImpl(rpc),
vault: new (await import("./vault/tx.rpc.msg")).MsgClientImpl(rpc),
vest: new (await import("./vest/tx.rpc.msg")).MsgClientImpl(rpc)
}
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Rpc } from "../../helpers";
import * as _m0 from "protobufjs/minimal";
import { MsgDepositToVault, MsgDepositToVaultResponse } from "./tx";
/** Msg defines the Msg service. */

export interface Msg {
/** DepositToVault deposits funds into a vault. */
depositToVault(request: MsgDepositToVault): Promise<MsgDepositToVaultResponse>;
}
export class MsgClientImpl implements Msg {
private readonly rpc: Rpc;

constructor(rpc: Rpc) {
this.rpc = rpc;
this.depositToVault = this.depositToVault.bind(this);
}

depositToVault(request: MsgDepositToVault): Promise<MsgDepositToVaultResponse> {
const data = MsgDepositToVault.encode(request).finish();
const promise = this.rpc.request("dydxprotocol.vault.Msg", "DepositToVault", data);
return promise.then(data => MsgDepositToVaultResponse.decode(new _m0.Reader(data)));
}

}
Loading

0 comments on commit 20ffef4

Please sign in to comment.