@dorafactory/maci-sdk 0.0.21 → 0.0.22
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 +7 -0
- package/dist/browser.d.ts +7 -0
- package/dist/browser.js +7 -0
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +7 -0
- package/dist/browser.mjs.map +1 -1
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/libs/maci/maci.ts +12 -0
package/package.json
CHANGED
package/src/libs/maci/maci.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx.js';
|
|
|
18
18
|
import { CertificateEcosystem, ErrorResponse } from '../../types';
|
|
19
19
|
import { SignatureResponse } from '../oracle-certificate/types';
|
|
20
20
|
import { OracleWhitelistConfig } from '../contract/ts/OracleMaci.types';
|
|
21
|
+
import { getAMaciRoundCircuitFee } from '../contract/utils';
|
|
21
22
|
|
|
22
23
|
export function isErrorResponse(response: unknown): response is ErrorResponse {
|
|
23
24
|
return (
|
|
@@ -313,6 +314,17 @@ export class MACI {
|
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
|
|
317
|
+
async queryAMaciChargeFee({
|
|
318
|
+
maxVoter,
|
|
319
|
+
maxOption,
|
|
320
|
+
}: {
|
|
321
|
+
maxVoter: number;
|
|
322
|
+
maxOption: number;
|
|
323
|
+
}) {
|
|
324
|
+
const fee = getAMaciRoundCircuitFee(maxVoter, maxOption);
|
|
325
|
+
return fee;
|
|
326
|
+
}
|
|
327
|
+
|
|
316
328
|
async queryRoundGasStation({ contractAddress }: { contractAddress: string }) {
|
|
317
329
|
const roundInfo = await this.getRoundInfo({ contractAddress });
|
|
318
330
|
|