@dydxprotocol/v4-client-js 1.12.1 → 1.12.3

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.1",
3
+ "version": "1.12.3",
4
4
  "description": "General client library for the new dYdX system (v4 decentralized)",
5
5
  "main": "build/src/index.js",
6
6
  "scripts": {
@@ -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]),
@@ -439,7 +439,7 @@ export async function withdraw(payload: string): Promise<string> {
439
439
  }
440
440
 
441
441
  const subaccount = new SubaccountInfo(wallet, subaccountNumber);
442
- const tx = await client.withdrawFromSubaccount(subaccount, amount, json.recipient);
442
+ const tx = await client.withdrawFromSubaccount(subaccount, amount, json.recipient, json.memo);
443
443
  return encodeJson(tx);
444
444
  } catch (error) {
445
445
  return wrappedError(error);
@@ -560,7 +560,7 @@ export async function transferNativeToken(payload: string): Promise<string> {
560
560
  },
561
561
  false,
562
562
  client.validatorClient.post.defaultDydxGasPrice,
563
- undefined,
563
+ json.memo,
564
564
  );
565
565
  return encodeJson(tx);
566
566
  } catch (error) {