@dydxprotocol/v4-client-js 1.12.0 → 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dydxprotocol/v4-client-js",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "General client library for the new dYdX system (v4 decentralized)",
5
5
  "main": "build/src/index.js",
6
6
  "scripts": {
@@ -42,7 +42,7 @@ export default class LocalWallet {
42
42
  registry: generateRegistry(),
43
43
  });
44
44
  const accountData = await signer.getAccounts();
45
- const firstAccount = accountData[0];
45
+ const firstAccount = accountData[0]!;
46
46
  this.accounts = [...accountData];
47
47
  this.address = firstAccount.address;
48
48
  this.pubKey = encodeSecp256k1Pubkey(firstAccount.pubkey);
@@ -899,9 +899,9 @@ export class Post {
899
899
  subaccount: SubaccountInfo,
900
900
  affiliate: string,
901
901
  broadcastMode?: BroadcastMode,
902
+ gasAdjustment: number = 2,
902
903
  ): Promise<BroadcastTxAsyncResponse | BroadcastTxSyncResponse | IndexedTx> {
903
904
  const msg = this.registerAffiliateMsg(subaccount.address, affiliate);
904
- const gasAdjustment = 1.8;
905
905
  return this.send(
906
906
  subaccount.wallet,
907
907
  () => Promise.resolve([msg]),
@@ -918,13 +918,21 @@ export class Post {
918
918
  return this.composer.composeMsgRegisterAffiliate(...args);
919
919
  }
920
920
 
921
- launchMarketMsg(...args: Parameters<Composer['composeMsgCreateMarketPermissionless']>): EncodeObject {
921
+ launchMarketMsg(
922
+ ...args: Parameters<Composer['composeMsgCreateMarketPermissionless']>
923
+ ): EncodeObject {
922
924
  return this.composer.composeMsgCreateMarketPermissionless(...args);
923
925
  }
924
926
 
925
- async createMarketPermissionless(ticker: string, subaccount: SubaccountInfo, broadcastMode?: BroadcastMode, gasAdjustment?: number, memo?: string): Promise<BroadcastTxAsyncResponse | BroadcastTxSyncResponse | IndexedTx> {
927
+ async createMarketPermissionless(
928
+ ticker: string,
929
+ subaccount: SubaccountInfo,
930
+ broadcastMode?: BroadcastMode,
931
+ gasAdjustment?: number,
932
+ memo?: string,
933
+ ): Promise<BroadcastTxAsyncResponse | BroadcastTxSyncResponse | IndexedTx> {
926
934
  const msg = this.launchMarketMsg(subaccount.address, ticker, subaccount.subaccountNumber);
927
-
935
+
928
936
  return this.send(
929
937
  subaccount.wallet,
930
938
  () => Promise.resolve([msg]),