@dorafactory/maci-sdk 0.1.2-pre.8 → 0.1.2
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 +16 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -5
- package/dist/index.mjs.map +1 -1
- package/dist/libs/contract/contract.d.ts +0 -2
- package/package.json +1 -1
- package/src/libs/const.ts +3 -3
- package/src/libs/contract/config.ts +1 -1
- package/src/libs/contract/contract.ts +12 -6
package/dist/index.js
CHANGED
|
@@ -427,16 +427,16 @@ function getDefaultParams(network = "mainnet") {
|
|
|
427
427
|
apiEndpoint: "https://vota-api.dorafactory.org",
|
|
428
428
|
certificateApiEndpoint: "https://vota-certificate-api.dorafactory.org/api/v1",
|
|
429
429
|
registryAddress: "dora1smg5qp5trjdkcekdjssqpjehdjf6n4cjss0clyvqcud3t3u3948s8rmgg4",
|
|
430
|
-
saasAddress: "
|
|
430
|
+
saasAddress: "dora1ksxvvve2nsw5uyvg7y6lnnxcqxadjepc78z0qa8enm5zhayxaqgqpsewf8",
|
|
431
431
|
maciCodeId: 106,
|
|
432
432
|
// oracleCodeId: 116,// 9-4-3-625
|
|
433
433
|
oracleCodeId: 119,
|
|
434
434
|
// 6-3-3-125
|
|
435
|
-
saasCodeId:
|
|
435
|
+
saasCodeId: 124,
|
|
436
436
|
oracleWhitelistBackendPubkey: "A61YtCv2ibMZmDeM02nEElil8wlHx1tLKogBk5dPgf/Q",
|
|
437
437
|
oracleFeegrantOperator: "dora16s9tljk8dy9ae335yvyzlm8gvkypx9228q8pq8",
|
|
438
438
|
oracleCodeIds: ["101", "116", "117", "119"],
|
|
439
|
-
saasCodeIds: ["
|
|
439
|
+
saasCodeIds: ["124"]
|
|
440
440
|
};
|
|
441
441
|
case "testnet":
|
|
442
442
|
return {
|
|
@@ -4570,7 +4570,8 @@ var SaasClient = class extends SaasQueryClient {
|
|
|
4570
4570
|
// src/libs/contract/config.ts
|
|
4571
4571
|
var defaultSigningClientOptions = {
|
|
4572
4572
|
broadcastPollIntervalMs: 8e3,
|
|
4573
|
-
broadcastTimeoutMs:
|
|
4573
|
+
broadcastTimeoutMs: 15e4,
|
|
4574
|
+
// 2min30s for the tx to be confirmed
|
|
4574
4575
|
gasPrice: import_stargate.GasPrice.fromString("10000000000peaka")
|
|
4575
4576
|
};
|
|
4576
4577
|
async function createMaciClientBy({
|
|
@@ -5384,7 +5385,17 @@ var Contract = class {
|
|
|
5384
5385
|
const [{ address }] = await signer.getAccounts();
|
|
5385
5386
|
const contractClient = await this.contractClient({ signer });
|
|
5386
5387
|
const msg = {
|
|
5387
|
-
create_oracle_maci_round:
|
|
5388
|
+
create_oracle_maci_round: {
|
|
5389
|
+
certification_system: "0",
|
|
5390
|
+
circuit_type: "0",
|
|
5391
|
+
coordinator: roundParams.coordinator,
|
|
5392
|
+
max_voters: roundParams.maxVoters.toString(),
|
|
5393
|
+
round_info: roundParams.roundInfo,
|
|
5394
|
+
start_time: roundParams.startTime,
|
|
5395
|
+
end_time: roundParams.endTime,
|
|
5396
|
+
vote_option_map: roundParams.voteOptionMap,
|
|
5397
|
+
whitelist_backend_pubkey: roundParams.whitelistBackendPubkey
|
|
5398
|
+
}
|
|
5388
5399
|
};
|
|
5389
5400
|
const gasEstimation = await contractClient.simulate(
|
|
5390
5401
|
address,
|