suidouble 0.0.21 → 0.0.23

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.
@@ -116,15 +116,22 @@ class SuiPackageModule extends SuiCommonMethods {
116
116
  const tx = new sui.TransactionBlock();
117
117
 
118
118
  const callArgs = [];
119
+
119
120
  for (let param of params) {
120
121
  if (param && param.type && param.amount && param.type === 'SUI') {
121
122
  let amount = BigInt(param.amount);
122
123
  const coin = tx.add(sui.Transactions.SplitCoins(tx.gas, [tx.pure(amount)]));
123
124
  callArgs.push(coin);
125
+ } else if (param && Array.isArray(param) && param.length == 1 && param[0].type && param[0].amount && param[0].type === 'SUI') {
126
+ // vector<Coin<SUI>>
127
+ let amount = BigInt(param[0].amount);
128
+ const coin = tx.add(sui.Transactions.SplitCoins(tx.gas, [tx.pure(amount)]));
129
+ callArgs.push(tx.makeMoveVec({ objects: [coin]}));
124
130
  } else {
125
131
  callArgs.push(tx.pure(param));
126
132
  }
127
133
  }
134
+
128
135
  tx.moveCall({
129
136
  target: `${this._package.address}::${this._moduleName}::${methodName}`,
130
137
  arguments: callArgs,
@@ -144,6 +151,11 @@ class SuiPackageModule extends SuiCommonMethods {
144
151
  },
145
152
  });
146
153
 
154
+ let status = null;
155
+ if (result && result.effects && result.effects.status && result.effects.status.status) {
156
+ status = result.effects.status.status;
157
+ }
158
+
147
159
  const listCreated = [];
148
160
  const listMutated = [];
149
161
  const listDeleted = [];
@@ -235,6 +247,7 @@ class SuiPackageModule extends SuiCommonMethods {
235
247
  created: listCreated,
236
248
  mutated: listMutated,
237
249
  deleted: listDeleted,
250
+ status: status,
238
251
  };
239
252
  }
240
253
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suidouble",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Set of provider, package and object classes for javascript representation of Sui Move smart contracts. Use same code for publishing, upgrading, integration testing, interaction with smart contracts and integration in browser web3 dapps",
5
5
  "main": "index.js",
6
6
  "scripts": {