polkamarkets-js 3.1.3 → 3.1.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/package.json
CHANGED
package/src/models/IContract.js
CHANGED
|
@@ -230,7 +230,7 @@ class IContract {
|
|
|
230
230
|
|
|
231
231
|
const smartAccount = await signerToSimpleSmartAccount(publicClient, {
|
|
232
232
|
signer: smartAccountSigner,
|
|
233
|
-
factoryAddress: PolkamarketsSmartAccount.PIMLICO_FACTORY_ADDRESS,
|
|
233
|
+
factoryAddress: networkConfig.factoryAddress || PolkamarketsSmartAccount.PIMLICO_FACTORY_ADDRESS,
|
|
234
234
|
entryPoint: ENTRYPOINT_ADDRESS_V06,
|
|
235
235
|
})
|
|
236
236
|
|
|
@@ -328,7 +328,7 @@ class IContract {
|
|
|
328
328
|
|
|
329
329
|
const smartAccount = await signerToSimpleSmartAccount(publicClient, {
|
|
330
330
|
signer: smartAccountSigner,
|
|
331
|
-
factoryAddress: PolkamarketsSmartAccount.PIMLICO_FACTORY_ADDRESS,
|
|
331
|
+
factoryAddress: networkConfig.factoryAddress || PolkamarketsSmartAccount.PIMLICO_FACTORY_ADDRESS,
|
|
332
332
|
entryPoint: ENTRYPOINT_ADDRESS_V06,
|
|
333
333
|
})
|
|
334
334
|
|
|
@@ -461,7 +461,7 @@ class IContract {
|
|
|
461
461
|
|
|
462
462
|
const factoryContract = getContract({
|
|
463
463
|
client: client,
|
|
464
|
-
address: PolkamarketsSmartAccount.THIRDWEB_FACTORY_ADDRESS,
|
|
464
|
+
address: networkConfig.factoryAddress || PolkamarketsSmartAccount.THIRDWEB_FACTORY_ADDRESS,
|
|
465
465
|
chain: chain,
|
|
466
466
|
});
|
|
467
467
|
|
|
@@ -96,7 +96,7 @@ class PolkamarketsSmartAccount {
|
|
|
96
96
|
|
|
97
97
|
const smartAccount = await signerToSimpleSmartAccount(publicClient, {
|
|
98
98
|
signer: smartAccountSigner,
|
|
99
|
-
factoryAddress: PolkamarketsSmartAccount.PIMLICO_FACTORY_ADDRESS,
|
|
99
|
+
factoryAddress: this.networkConfig.factoryAddress || PolkamarketsSmartAccount.PIMLICO_FACTORY_ADDRESS,
|
|
100
100
|
entryPoint: ENTRYPOINT_ADDRESS_V06,
|
|
101
101
|
})
|
|
102
102
|
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.8.18;
|
|
3
|
-
|
|
4
|
-
// local imports
|
|
5
|
-
import "./IPredictionMarketV3.sol";
|
|
6
|
-
|
|
7
|
-
/// @title Market Contract Factory
|
|
8
|
-
contract PredictionMarketV3Claimer {
|
|
9
|
-
IPredictionMarketV3 public immutable PredictionMarketV3;
|
|
10
|
-
|
|
11
|
-
/// @dev protocol is immutable and has no ownership
|
|
12
|
-
constructor(IPredictionMarketV3 _PredictionMarketV3) {
|
|
13
|
-
PredictionMarketV3 = _PredictionMarketV3;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function claimMultipleWinnings(uint256[] memory marketIds) external {
|
|
17
|
-
for (uint256 i = 0; i < marketIds.length; i++) {
|
|
18
|
-
PredictionMarketV3.claimWinnings(marketIds[i]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function claimMultipleVoidedOutcomeShares(uint256[] memory marketIds, uint256[] memory outcomeIds) external {
|
|
23
|
-
require(marketIds.length == outcomeIds.length, "PredictionMarketV3Querier: marketIds and outcomeIds length mismatch");
|
|
24
|
-
|
|
25
|
-
for (uint256 i = 0; i < marketIds.length; i++) {
|
|
26
|
-
PredictionMarketV3.claimVoidedOutcomeShares(marketIds[i], outcomeIds[i]);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|