@rainprotocolsdk/sdk 2.1.1 → 2.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.
|
@@ -30,21 +30,33 @@ export async function buildCloseMarketRawTx(params) {
|
|
|
30
30
|
if (proposedOutcome === undefined) {
|
|
31
31
|
throw new Error("proposedOutcome is required for V2 markets");
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
if (isAiResolver) {
|
|
34
|
+
// AI resolver: closePool() with no args
|
|
35
|
+
txs.push({
|
|
36
|
+
to: contractAddress,
|
|
37
|
+
data: encodeFunctionData({
|
|
38
|
+
abi: TradePoolAbi,
|
|
39
|
+
functionName: CLOSE_POOL,
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
txs.push({
|
|
45
|
+
to: contractAddress,
|
|
46
|
+
data: encodeFunctionData({
|
|
47
|
+
abi: TradePoolAbi,
|
|
48
|
+
functionName: CLOSE_POOL,
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
txs.push({
|
|
52
|
+
to: contractAddress,
|
|
53
|
+
data: encodeFunctionData({
|
|
54
|
+
abi: TradePoolAbi,
|
|
55
|
+
functionName: CHOOSE_WINNER,
|
|
56
|
+
args: [BigInt(proposedOutcome)],
|
|
57
|
+
}),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
48
60
|
}
|
|
49
61
|
else {
|
|
50
62
|
// V3 flow: optional approvals → closePool() or closePool(proposedOutcome)
|