@dorafactory/maci-sdk 0.0.30 → 0.0.32
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/dist/browser.d.mts +132 -117
- package/dist/browser.d.ts +132 -117
- package/dist/browser.js +296 -133
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +296 -133
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +132 -117
- package/dist/index.d.ts +132 -117
- package/dist/index.js +296 -133
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +296 -133
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/libs/maci/maci.ts +112 -0
- package/src/maci.ts +304 -157
package/package.json
CHANGED
package/src/libs/maci/maci.ts
CHANGED
|
@@ -770,4 +770,116 @@ export class MACI {
|
|
|
770
770
|
const ecosystems = await this.oracleCertificate.listEcosystems();
|
|
771
771
|
return ecosystems;
|
|
772
772
|
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Batch grant with bond (for maci)
|
|
776
|
+
* @param client
|
|
777
|
+
* @param contractAddress
|
|
778
|
+
* @param address
|
|
779
|
+
* @param amount
|
|
780
|
+
* @returns
|
|
781
|
+
*/
|
|
782
|
+
async batchGrantWithBond(
|
|
783
|
+
client: SigningCosmWasmClient,
|
|
784
|
+
contractAddress: string,
|
|
785
|
+
address: string,
|
|
786
|
+
amount: string
|
|
787
|
+
) {
|
|
788
|
+
const msgs: MsgExecuteContractEncodeObject[] = [
|
|
789
|
+
{
|
|
790
|
+
typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
|
|
791
|
+
value: MsgExecuteContract.fromPartial({
|
|
792
|
+
sender: address,
|
|
793
|
+
contract: contractAddress,
|
|
794
|
+
msg: new TextEncoder().encode(
|
|
795
|
+
JSON.stringify(
|
|
796
|
+
stringizing({
|
|
797
|
+
grant: {
|
|
798
|
+
max_amount: BigInt('100000000000000000000000'),
|
|
799
|
+
},
|
|
800
|
+
})
|
|
801
|
+
)
|
|
802
|
+
),
|
|
803
|
+
}),
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
|
|
807
|
+
value: MsgExecuteContract.fromPartial({
|
|
808
|
+
sender: address,
|
|
809
|
+
contract: contractAddress,
|
|
810
|
+
msg: new TextEncoder().encode(
|
|
811
|
+
JSON.stringify(
|
|
812
|
+
stringizing({
|
|
813
|
+
bond: {},
|
|
814
|
+
})
|
|
815
|
+
)
|
|
816
|
+
),
|
|
817
|
+
funds: [
|
|
818
|
+
{
|
|
819
|
+
denom: 'peaka',
|
|
820
|
+
amount,
|
|
821
|
+
},
|
|
822
|
+
],
|
|
823
|
+
}),
|
|
824
|
+
},
|
|
825
|
+
];
|
|
826
|
+
|
|
827
|
+
try {
|
|
828
|
+
const result = await client.signAndBroadcast(address, msgs, 'auto');
|
|
829
|
+
return result;
|
|
830
|
+
} catch (err) {
|
|
831
|
+
throw err;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Batch revoke with withdraw (for maci)
|
|
837
|
+
* @param client
|
|
838
|
+
* @param contractAddress
|
|
839
|
+
* @param address
|
|
840
|
+
* @returns
|
|
841
|
+
*/
|
|
842
|
+
async batchRevokeWithdraw(
|
|
843
|
+
client: SigningCosmWasmClient,
|
|
844
|
+
contractAddress: string,
|
|
845
|
+
address: string
|
|
846
|
+
) {
|
|
847
|
+
const msgs: MsgExecuteContractEncodeObject[] = [
|
|
848
|
+
{
|
|
849
|
+
typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
|
|
850
|
+
value: MsgExecuteContract.fromPartial({
|
|
851
|
+
sender: address,
|
|
852
|
+
contract: contractAddress,
|
|
853
|
+
msg: new TextEncoder().encode(
|
|
854
|
+
JSON.stringify(
|
|
855
|
+
stringizing({
|
|
856
|
+
withdraw: {},
|
|
857
|
+
})
|
|
858
|
+
)
|
|
859
|
+
),
|
|
860
|
+
}),
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
typeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
|
|
864
|
+
value: MsgExecuteContract.fromPartial({
|
|
865
|
+
sender: address,
|
|
866
|
+
contract: contractAddress,
|
|
867
|
+
msg: new TextEncoder().encode(
|
|
868
|
+
JSON.stringify(
|
|
869
|
+
stringizing({
|
|
870
|
+
revoke: {},
|
|
871
|
+
})
|
|
872
|
+
)
|
|
873
|
+
),
|
|
874
|
+
}),
|
|
875
|
+
},
|
|
876
|
+
];
|
|
877
|
+
|
|
878
|
+
try {
|
|
879
|
+
const result = await client.signAndBroadcast(address, msgs, 'auto');
|
|
880
|
+
return result;
|
|
881
|
+
} catch (err) {
|
|
882
|
+
throw err;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
773
885
|
}
|
package/src/maci.ts
CHANGED
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
CircuitsResponse,
|
|
12
12
|
ProofResponse,
|
|
13
13
|
SelectiveRoundResponse,
|
|
14
|
+
CertificateEcosystem,
|
|
15
|
+
ErrorResponse,
|
|
16
|
+
RoundType,
|
|
14
17
|
} from './types';
|
|
15
18
|
import {
|
|
16
19
|
Http,
|
|
@@ -27,6 +30,11 @@ import {
|
|
|
27
30
|
CreateOracleMaciRoundParams,
|
|
28
31
|
} from './libs/contract/types';
|
|
29
32
|
import { OfflineSigner } from '@cosmjs/proto-signing';
|
|
33
|
+
import { Account, PublicKey } from './libs/circom';
|
|
34
|
+
import { SigningCosmWasmClient } from '@cosmjs/cosmwasm-stargate';
|
|
35
|
+
import { OracleWhitelistConfig } from './libs/contract/ts/OracleMaci.types';
|
|
36
|
+
import { SignatureResponse } from './libs/oracle-certificate/types';
|
|
37
|
+
import { StdFee } from '@cosmjs/stargate';
|
|
30
38
|
|
|
31
39
|
/**
|
|
32
40
|
* @class MaciClient
|
|
@@ -172,193 +180,332 @@ export class MaciClient {
|
|
|
172
180
|
return await this.contract.createOracleMaciRound(params);
|
|
173
181
|
}
|
|
174
182
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
+
async getStateIdxInc({
|
|
184
|
+
signer,
|
|
185
|
+
address,
|
|
186
|
+
contractAddress,
|
|
187
|
+
}: {
|
|
188
|
+
signer: OfflineSigner;
|
|
189
|
+
address: string;
|
|
190
|
+
contractAddress: string;
|
|
191
|
+
}) {
|
|
192
|
+
return await this.maci.getStateIdxInc({
|
|
193
|
+
signer,
|
|
194
|
+
address,
|
|
195
|
+
contractAddress,
|
|
196
|
+
});
|
|
183
197
|
}
|
|
184
198
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
async getVoiceCreditBalance({
|
|
200
|
+
signer,
|
|
201
|
+
stateIdx,
|
|
202
|
+
contractAddress,
|
|
203
|
+
}: {
|
|
204
|
+
signer: OfflineSigner;
|
|
205
|
+
stateIdx: number;
|
|
206
|
+
contractAddress: string;
|
|
207
|
+
}) {
|
|
208
|
+
return await this.maci.getVoiceCreditBalance({
|
|
209
|
+
signer,
|
|
210
|
+
stateIdx,
|
|
211
|
+
contractAddress,
|
|
212
|
+
});
|
|
193
213
|
}
|
|
194
214
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return await this.indexer.round.getRoundWithFields(address, fields);
|
|
215
|
+
async getStateIdxByPubKey({
|
|
216
|
+
contractAddress,
|
|
217
|
+
pubKey,
|
|
218
|
+
}: {
|
|
219
|
+
contractAddress: string;
|
|
220
|
+
pubKey: bigint[];
|
|
221
|
+
}) {
|
|
222
|
+
return await this.maci.getStateIdxByPubKey({
|
|
223
|
+
contractAddress,
|
|
224
|
+
pubKey,
|
|
225
|
+
});
|
|
207
226
|
}
|
|
208
227
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
228
|
+
async feegrantAllowance({
|
|
229
|
+
address,
|
|
230
|
+
contractAddress,
|
|
231
|
+
}: {
|
|
232
|
+
address: string;
|
|
233
|
+
contractAddress: string;
|
|
234
|
+
}) {
|
|
235
|
+
return await this.maci.feegrantAllowance({
|
|
236
|
+
address,
|
|
237
|
+
contractAddress,
|
|
238
|
+
});
|
|
218
239
|
}
|
|
219
240
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
limit?: number
|
|
232
|
-
): Promise<RoundsResponse> {
|
|
233
|
-
return await this.indexer.round.getRoundsByStatus(status, after, limit);
|
|
241
|
+
async hasFeegrant({
|
|
242
|
+
address,
|
|
243
|
+
contractAddress,
|
|
244
|
+
}: {
|
|
245
|
+
address: string;
|
|
246
|
+
contractAddress: string;
|
|
247
|
+
}): Promise<boolean> {
|
|
248
|
+
return await this.maci.hasFeegrant({
|
|
249
|
+
address,
|
|
250
|
+
contractAddress,
|
|
251
|
+
});
|
|
234
252
|
}
|
|
235
253
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
): Promise<
|
|
249
|
-
return await this.
|
|
254
|
+
async queryWhitelistBalanceOf({
|
|
255
|
+
signer,
|
|
256
|
+
address,
|
|
257
|
+
contractAddress,
|
|
258
|
+
certificate,
|
|
259
|
+
mode = 'maci',
|
|
260
|
+
}: {
|
|
261
|
+
signer: OfflineSigner;
|
|
262
|
+
address: string;
|
|
263
|
+
contractAddress: string;
|
|
264
|
+
certificate?: string;
|
|
265
|
+
mode?: 'maci' | 'amaci';
|
|
266
|
+
}): Promise<string> {
|
|
267
|
+
return await this.maci.queryWhitelistBalanceOf({
|
|
268
|
+
signer,
|
|
269
|
+
address,
|
|
270
|
+
contractAddress,
|
|
271
|
+
certificate,
|
|
272
|
+
mode,
|
|
273
|
+
});
|
|
250
274
|
}
|
|
251
275
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
276
|
+
async isWhitelisted({
|
|
277
|
+
signer,
|
|
278
|
+
address,
|
|
279
|
+
contractAddress,
|
|
280
|
+
}: {
|
|
281
|
+
signer: OfflineSigner;
|
|
282
|
+
address: string;
|
|
283
|
+
contractAddress: string;
|
|
284
|
+
}) {
|
|
285
|
+
return await this.maci.isWhitelisted({
|
|
286
|
+
signer,
|
|
287
|
+
address,
|
|
288
|
+
contractAddress,
|
|
289
|
+
});
|
|
266
290
|
}
|
|
267
291
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
return await this.
|
|
292
|
+
async getOracleWhitelistConfig({
|
|
293
|
+
signer,
|
|
294
|
+
contractAddress,
|
|
295
|
+
}: {
|
|
296
|
+
signer: OfflineSigner;
|
|
297
|
+
contractAddress: string;
|
|
298
|
+
}): Promise<OracleWhitelistConfig> {
|
|
299
|
+
return await this.maci.getOracleWhitelistConfig({
|
|
300
|
+
signer,
|
|
301
|
+
contractAddress,
|
|
302
|
+
});
|
|
276
303
|
}
|
|
277
304
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
* @description Get multiple operators.
|
|
281
|
-
* @param {string} after - The cursor to start after.
|
|
282
|
-
* @param {number} [limit] - The number of operators to retrieve.
|
|
283
|
-
* @returns {Promise<OperatorsResponse>} The operators response.
|
|
284
|
-
*/
|
|
285
|
-
async getOperators(
|
|
286
|
-
after: string,
|
|
287
|
-
limit?: number
|
|
288
|
-
): Promise<OperatorsResponse> {
|
|
289
|
-
return await this.indexer.operator.getOperators(after, limit);
|
|
305
|
+
async getRoundInfo({ contractAddress }: { contractAddress: string }) {
|
|
306
|
+
return await this.maci.getRoundInfo({ contractAddress });
|
|
290
307
|
}
|
|
291
308
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
* @description Get a circuit by its name.
|
|
295
|
-
* @param {string} name - The name of the circuit.
|
|
296
|
-
* @returns {Promise<CircuitResponse>} The circuit response.
|
|
297
|
-
*/
|
|
298
|
-
async getCircuitByName(name: string): Promise<CircuitResponse> {
|
|
299
|
-
return await this.indexer.circuit.getCircuitByName(name);
|
|
309
|
+
async getRoundCircuitType({ contractAddress }: { contractAddress: string }) {
|
|
310
|
+
return await this.maci.getRoundCircuitType({ contractAddress });
|
|
300
311
|
}
|
|
301
312
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
* @description Get all available circuits.
|
|
305
|
-
* @returns {Promise<CircuitsResponse>} The circuits response.
|
|
306
|
-
*/
|
|
307
|
-
async getCircuits(): Promise<CircuitsResponse> {
|
|
308
|
-
return await this.indexer.circuit.getCircuits();
|
|
313
|
+
async queryRoundIsQv({ contractAddress }: { contractAddress: string }) {
|
|
314
|
+
return await this.maci.queryRoundIsQv({ contractAddress });
|
|
309
315
|
}
|
|
310
316
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
async queryRoundClaimable({
|
|
318
|
+
contractAddress,
|
|
319
|
+
}: {
|
|
320
|
+
contractAddress: string;
|
|
321
|
+
}): Promise<{
|
|
322
|
+
claimable: boolean | null;
|
|
323
|
+
balance: string | null;
|
|
324
|
+
}> {
|
|
325
|
+
return await this.maci.queryRoundClaimable({ contractAddress });
|
|
319
326
|
}
|
|
320
327
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
return await this.indexer.transaction.getTransactions(after, limit);
|
|
328
|
+
async queryAMaciChargeFee({
|
|
329
|
+
maxVoter,
|
|
330
|
+
maxOption,
|
|
331
|
+
}: {
|
|
332
|
+
maxVoter: number;
|
|
333
|
+
maxOption: number;
|
|
334
|
+
}) {
|
|
335
|
+
return await this.maci.queryAMaciChargeFee({
|
|
336
|
+
maxVoter,
|
|
337
|
+
maxOption,
|
|
338
|
+
});
|
|
333
339
|
}
|
|
334
340
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
async queryRoundGasStation({ contractAddress }: { contractAddress: string }) {
|
|
342
|
+
return await this.maci.queryRoundGasStation({ contractAddress });
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
parseRoundStatus(
|
|
346
|
+
votingStart: number,
|
|
347
|
+
votingEnd: number,
|
|
348
|
+
status: string,
|
|
349
|
+
currentTime: Date
|
|
350
|
+
): string {
|
|
351
|
+
return this.maci.parseRoundStatus(
|
|
352
|
+
votingStart,
|
|
353
|
+
votingEnd,
|
|
354
|
+
status,
|
|
355
|
+
currentTime
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
async queryRoundBalance({ contractAddress }: { contractAddress: string }) {
|
|
360
|
+
return await this.maci.queryRoundBalance({ contractAddress });
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
async requestOracleCertificate({
|
|
364
|
+
signer,
|
|
365
|
+
ecosystem,
|
|
366
|
+
address,
|
|
367
|
+
contractAddress,
|
|
368
|
+
}: {
|
|
369
|
+
signer: OfflineSigner;
|
|
370
|
+
ecosystem: CertificateEcosystem;
|
|
371
|
+
address: string;
|
|
372
|
+
contractAddress: string;
|
|
373
|
+
}): Promise<SignatureResponse> {
|
|
374
|
+
return await this.maci.requestOracleCertificate({
|
|
375
|
+
signer,
|
|
376
|
+
ecosystem,
|
|
377
|
+
address,
|
|
378
|
+
contractAddress,
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
async signup({
|
|
383
|
+
signer,
|
|
384
|
+
address,
|
|
385
|
+
contractAddress,
|
|
386
|
+
maciAccount,
|
|
387
|
+
oracleCertificate,
|
|
388
|
+
gasStation = false,
|
|
389
|
+
}: {
|
|
390
|
+
signer: OfflineSigner;
|
|
391
|
+
address: string;
|
|
392
|
+
contractAddress: string;
|
|
393
|
+
maciAccount?: Account;
|
|
394
|
+
oracleCertificate?: {
|
|
395
|
+
amount: string;
|
|
396
|
+
signature: string;
|
|
397
|
+
};
|
|
398
|
+
gasStation?: boolean;
|
|
399
|
+
}) {
|
|
400
|
+
return await this.maci.signup({
|
|
401
|
+
signer,
|
|
402
|
+
address,
|
|
403
|
+
contractAddress,
|
|
404
|
+
maciAccount,
|
|
405
|
+
oracleCertificate,
|
|
406
|
+
gasStation,
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
async vote({
|
|
411
|
+
signer,
|
|
412
|
+
address,
|
|
413
|
+
stateIdx,
|
|
414
|
+
contractAddress,
|
|
415
|
+
selectedOptions,
|
|
416
|
+
operatorCoordPubKey,
|
|
417
|
+
maciAccount,
|
|
418
|
+
gasStation = false,
|
|
419
|
+
}: {
|
|
420
|
+
signer: OfflineSigner;
|
|
421
|
+
address: string;
|
|
422
|
+
stateIdx: number;
|
|
423
|
+
contractAddress: string;
|
|
424
|
+
selectedOptions: {
|
|
425
|
+
idx: number;
|
|
426
|
+
vc: number;
|
|
427
|
+
}[];
|
|
428
|
+
operatorCoordPubKey: PublicKey;
|
|
429
|
+
maciAccount?: Account;
|
|
430
|
+
gasStation?: boolean;
|
|
431
|
+
}) {
|
|
432
|
+
return await this.maci.vote({
|
|
433
|
+
signer,
|
|
434
|
+
address,
|
|
435
|
+
stateIdx,
|
|
436
|
+
contractAddress,
|
|
437
|
+
selectedOptions,
|
|
438
|
+
operatorCoordPubKey,
|
|
439
|
+
maciAccount,
|
|
440
|
+
gasStation,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
async publishMessage({
|
|
445
|
+
client,
|
|
446
|
+
address,
|
|
447
|
+
payload,
|
|
448
|
+
contractAddress,
|
|
449
|
+
gasStation,
|
|
450
|
+
}: {
|
|
451
|
+
client: SigningCosmWasmClient;
|
|
452
|
+
address: string;
|
|
453
|
+
payload: {
|
|
454
|
+
msg: bigint[];
|
|
455
|
+
encPubkeys: PublicKey;
|
|
456
|
+
}[];
|
|
457
|
+
contractAddress: string;
|
|
458
|
+
gasStation: boolean;
|
|
459
|
+
}) {
|
|
460
|
+
return await this.maci.publishMessage({
|
|
461
|
+
client,
|
|
462
|
+
address,
|
|
463
|
+
payload,
|
|
464
|
+
contractAddress,
|
|
465
|
+
gasStation,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
async claimAMaciRound({
|
|
470
|
+
signer,
|
|
471
|
+
contractAddress,
|
|
472
|
+
}: {
|
|
473
|
+
signer: OfflineSigner;
|
|
474
|
+
contractAddress: string;
|
|
475
|
+
}) {
|
|
476
|
+
return await this.maci.claimAMaciRound({
|
|
477
|
+
signer,
|
|
478
|
+
contractAddress,
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
async getOracleCertificateConfig() {
|
|
483
|
+
return await this.maci.getOracleCertificateConfig();
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
async batchGrantWithBond(
|
|
487
|
+
client: SigningCosmWasmClient,
|
|
488
|
+
contractAddress: string,
|
|
344
489
|
address: string,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
490
|
+
amount: string
|
|
491
|
+
) {
|
|
492
|
+
return await this.maci.batchGrantWithBond(
|
|
493
|
+
client,
|
|
494
|
+
contractAddress,
|
|
349
495
|
address,
|
|
350
|
-
|
|
351
|
-
limit
|
|
496
|
+
amount
|
|
352
497
|
);
|
|
353
498
|
}
|
|
354
499
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
500
|
+
async batchRevokeWithdraw(
|
|
501
|
+
client: SigningCosmWasmClient,
|
|
502
|
+
contractAddress: string,
|
|
503
|
+
address: string
|
|
504
|
+
) {
|
|
505
|
+
return await this.maci.batchRevokeWithdraw(
|
|
506
|
+
client,
|
|
507
|
+
contractAddress,
|
|
508
|
+
address
|
|
509
|
+
);
|
|
363
510
|
}
|
|
364
511
|
}
|