@dorafactory/maci-sdk 0.1.2-pre.2 → 0.1.2-pre.4
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/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -7
- package/dist/index.mjs.map +1 -1
- package/dist/libs/contract/contract.d.ts +1 -1
- package/package.json +1 -1
- package/src/libs/contract/contract.ts +2 -10
- package/src/maci.ts +3 -1
|
@@ -28,7 +28,7 @@ export declare class Contract {
|
|
|
28
28
|
createMaciRound({ signer, operatorPubkey, startVoting, endVoting, whitelist, title, description, link, maxVoter, maxOption, circuitType, certSystemType, fee, }: CreateMaciRoundParams & {
|
|
29
29
|
signer: OfflineSigner;
|
|
30
30
|
}): Promise<import("@cosmjs/cosmwasm-stargate").InstantiateResult>;
|
|
31
|
-
createOracleMaciRound({ signer, operatorPubkey, startVoting, endVoting, title, description, link,
|
|
31
|
+
createOracleMaciRound({ signer, operatorPubkey, startVoting, endVoting, title, description, link, voteOptionMap, circuitType, whitelistEcosystem, whitelistSnapshotHeight, whitelistVotingPowerArgs, fee, }: CreateOracleMaciRoundParams & {
|
|
32
32
|
signer: OfflineSigner;
|
|
33
33
|
}): Promise<import("@cosmjs/cosmwasm-stargate").InstantiateResult>;
|
|
34
34
|
createSaasOracleMaciRound({ signer, operatorPubkey, startVoting, endVoting, title, description, link, maxVoter, voteOptionMap, whitelistBackendPubkey, }: CreateSaasOracleMaciRoundParams & {
|
package/package.json
CHANGED
|
@@ -206,14 +206,11 @@ export class Contract {
|
|
|
206
206
|
title,
|
|
207
207
|
description,
|
|
208
208
|
link,
|
|
209
|
-
maxVoter,
|
|
210
209
|
voteOptionMap,
|
|
211
210
|
circuitType,
|
|
212
211
|
whitelistEcosystem,
|
|
213
212
|
whitelistSnapshotHeight,
|
|
214
213
|
whitelistVotingPowerArgs,
|
|
215
|
-
whitelistBackendPubkey,
|
|
216
|
-
feegrantOperator,
|
|
217
214
|
fee = 'auto',
|
|
218
215
|
}: CreateOracleMaciRoundParams & { signer: OfflineSigner }) {
|
|
219
216
|
const start_time = (startVoting.getTime() * 1_000_000).toString();
|
|
@@ -235,7 +232,6 @@ export class Contract {
|
|
|
235
232
|
address,
|
|
236
233
|
this.oracleCodeId,
|
|
237
234
|
{
|
|
238
|
-
max_voters: maxVoter.toString(),
|
|
239
235
|
round_info: { title, description: description || '', link: link || '' },
|
|
240
236
|
voting_time: {
|
|
241
237
|
start_time,
|
|
@@ -246,17 +242,13 @@ export class Contract {
|
|
|
246
242
|
y: operatorPubkeyY.toString(),
|
|
247
243
|
},
|
|
248
244
|
vote_option_map: voteOptionMap,
|
|
249
|
-
whitelist_backend_pubkey: whitelistBackendPubkey
|
|
250
|
-
? whitelistBackendPubkey
|
|
251
|
-
: this.whitelistBackendPubkey,
|
|
245
|
+
whitelist_backend_pubkey: this.whitelistBackendPubkey,
|
|
252
246
|
whitelist_ecosystem: whitelistEcosystem,
|
|
253
247
|
whitelist_snapshot_height: whitelistSnapshotHeight,
|
|
254
248
|
whitelist_voting_power_args: whitelistVotingPowerArgs,
|
|
255
249
|
circuit_type: maciVoteType,
|
|
256
250
|
certification_system: maciCertSystem,
|
|
257
|
-
feegrant_operator: feegrantOperator
|
|
258
|
-
? feegrantOperator
|
|
259
|
-
: this.feegrantOperator,
|
|
251
|
+
feegrant_operator: this.feegrantOperator,
|
|
260
252
|
},
|
|
261
253
|
`[Oracle MACI] ${title}`,
|
|
262
254
|
fee
|
package/src/maci.ts
CHANGED
|
@@ -330,7 +330,9 @@ export class MaciClient {
|
|
|
330
330
|
address?: string;
|
|
331
331
|
contractAddress: string;
|
|
332
332
|
}): Promise<boolean> {
|
|
333
|
-
address
|
|
333
|
+
if (address === undefined) {
|
|
334
|
+
address = await this.getAddress(signer);
|
|
335
|
+
}
|
|
334
336
|
return await this.maci.hasFeegrant({
|
|
335
337
|
address,
|
|
336
338
|
contractAddress,
|