pandora-cli-skills 1.1.10 → 1.1.12
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/SKILL.md +2 -2
- package/cli/lib/pandora_deploy_service.cjs +1 -1
- package/cli/lib/polymarket_ops_service.cjs +10 -2
- package/cli/lib/polymarket_trade_adapter.cjs +2 -1
- package/package.json +1 -1
- package/references/creation-script.md +1 -1
- package/scripts/create_market_launcher.ts +1 -1
- package/scripts/create_polymarket_clone_and_bet.ts +1 -1
package/SKILL.md
CHANGED
|
@@ -217,7 +217,7 @@ pandora clone-bet \
|
|
|
217
217
|
--sources "https://www.premierleague.com" "https://www.bbc.com/sport/football" \
|
|
218
218
|
--target-timestamp 1772323200 \
|
|
219
219
|
--target-timestamp-offset-hours 1 \
|
|
220
|
-
--arbiter
|
|
220
|
+
--arbiter 0x0D7B957C47Da86c2968dc52111D633D42cb7a5F7 \
|
|
221
221
|
--category 3 \
|
|
222
222
|
--liquidity 10 \
|
|
223
223
|
--curve-flattener 7 \
|
|
@@ -229,7 +229,7 @@ pandora clone-bet \
|
|
|
229
229
|
For live execution, replace `--dry-run` with `--execute`.
|
|
230
230
|
If `pandora` is not linked yet, use `node cli/pandora.cjs clone-bet ...`.
|
|
231
231
|
|
|
232
|
-
Default arbiter (whitelisted): `
|
|
232
|
+
Default arbiter (whitelisted): `0x0D7B957C47Da86c2968dc52111D633D42cb7a5F7`
|
|
233
233
|
|
|
234
234
|
## Launch AMM/Parimutuel (market launcher)
|
|
235
235
|
```bash
|
|
@@ -209,7 +209,7 @@ function buildDeploymentArgs(options = {}) {
|
|
|
209
209
|
distributionNo,
|
|
210
210
|
feeTier,
|
|
211
211
|
maxImbalance,
|
|
212
|
-
arbiter: String(options.arbiter || '
|
|
212
|
+
arbiter: String(options.arbiter || '0x0D7B957C47Da86c2968dc52111D633D42cb7a5F7').toLowerCase(),
|
|
213
213
|
category,
|
|
214
214
|
};
|
|
215
215
|
}
|
|
@@ -5,6 +5,7 @@ const POLYGON_CHAIN_ID = 137;
|
|
|
5
5
|
const POLYMARKET_SIG_TYPE_EOA = 0;
|
|
6
6
|
const POLYMARKET_SIG_TYPE_PROXY = 2;
|
|
7
7
|
const MAX_UINT256 = (1n << 256n) - 1n;
|
|
8
|
+
const DEFAULT_ALLOWANCE_SUFFICIENT_FLOOR_RAW = 1n << 128n;
|
|
8
9
|
|
|
9
10
|
// Polygon mainnet addresses from official Polymarket CLOB contract config/docs.
|
|
10
11
|
const POLYMARKET_POLYGON_DEFAULTS = {
|
|
@@ -262,6 +263,9 @@ function computeApprovalDiff(input = {}) {
|
|
|
262
263
|
const ownerAddress = normalizeAddress(input.ownerAddress, 'ownerAddress');
|
|
263
264
|
const spenders = Array.isArray(input.spenders) ? input.spenders : POLYMARKET_POLYGON_DEFAULTS.spenders;
|
|
264
265
|
const allowanceTargetRaw = toBigIntOrNull(input.allowanceTargetRaw) || MAX_UINT256;
|
|
266
|
+
const allowanceSufficientFloorRaw = toBigIntOrNull(input.allowanceSufficientFloorRaw) || DEFAULT_ALLOWANCE_SUFFICIENT_FLOOR_RAW;
|
|
267
|
+
const allowanceRequiredForReadyRaw =
|
|
268
|
+
allowanceTargetRaw > allowanceSufficientFloorRaw ? allowanceSufficientFloorRaw : allowanceTargetRaw;
|
|
265
269
|
const allowanceBySpender = input.allowanceBySpender && typeof input.allowanceBySpender === 'object'
|
|
266
270
|
? input.allowanceBySpender
|
|
267
271
|
: {};
|
|
@@ -285,9 +289,10 @@ function computeApprovalDiff(input = {}) {
|
|
|
285
289
|
ownerAddress,
|
|
286
290
|
spender: spender.address,
|
|
287
291
|
requiredRaw: allowanceTargetRaw.toString(),
|
|
292
|
+
requiredForReadyRaw: allowanceRequiredForReadyRaw.toString(),
|
|
288
293
|
currentRaw: parsed === null ? null : parsed.toString(),
|
|
289
294
|
readOk,
|
|
290
|
-
missing: !readOk || parsed === null || parsed <
|
|
295
|
+
missing: !readOk || parsed === null || parsed < allowanceRequiredForReadyRaw,
|
|
291
296
|
error: rawValue && rawValue.error ? rawValue.error : null,
|
|
292
297
|
});
|
|
293
298
|
}
|
|
@@ -318,6 +323,8 @@ function computeApprovalDiff(input = {}) {
|
|
|
318
323
|
const missingChecks = checks.filter((item) => item.missing);
|
|
319
324
|
return {
|
|
320
325
|
targetAllowanceRaw: allowanceTargetRaw.toString(),
|
|
326
|
+
allowanceSufficientFloorRaw: allowanceSufficientFloorRaw.toString(),
|
|
327
|
+
allowanceRequiredForReadyRaw: allowanceRequiredForReadyRaw.toString(),
|
|
321
328
|
checks,
|
|
322
329
|
missingChecks,
|
|
323
330
|
missingCount: missingChecks.length,
|
|
@@ -456,7 +463,8 @@ async function runApiKeySanity(runtime, signerAddress, deps = {}, strict = false
|
|
|
456
463
|
let creds = null;
|
|
457
464
|
if (typeof bootstrap.deriveApiKey === 'function') {
|
|
458
465
|
try {
|
|
459
|
-
|
|
466
|
+
// deriveApiKey expects nonce, not signature type; use nonce 0.
|
|
467
|
+
creds = await bootstrap.deriveApiKey(0);
|
|
460
468
|
} catch {
|
|
461
469
|
creds = await bootstrap.deriveApiKey();
|
|
462
470
|
}
|
|
@@ -1373,7 +1373,8 @@ async function buildTradingClient(options = {}) {
|
|
|
1373
1373
|
);
|
|
1374
1374
|
if (typeof bootstrap.deriveApiKey === 'function') {
|
|
1375
1375
|
try {
|
|
1376
|
-
|
|
1376
|
+
// deriveApiKey expects nonce, not signature type; default to nonce 0.
|
|
1377
|
+
creds = await bootstrap.deriveApiKey(0);
|
|
1377
1378
|
} catch {
|
|
1378
1379
|
creds = await bootstrap.deriveApiKey();
|
|
1379
1380
|
}
|
package/package.json
CHANGED
|
@@ -47,7 +47,7 @@ pandora launch \
|
|
|
47
47
|
--sources "https://coinmarketcap.com/currencies/bitcoin/" "https://www.coingecko.com/en/coins/bitcoin" \
|
|
48
48
|
--target-timestamp 1798675200 \
|
|
49
49
|
--target-timestamp-offset-hours 1 \
|
|
50
|
-
--arbiter
|
|
50
|
+
--arbiter 0x0D7B957C47Da86c2968dc52111D633D42cb7a5F7 \
|
|
51
51
|
--category 3 \
|
|
52
52
|
--market-type amm \
|
|
53
53
|
--liquidity 100 \
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from 'viem';
|
|
12
12
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
13
13
|
|
|
14
|
-
const DEFAULT_ARBITER = '
|
|
14
|
+
const DEFAULT_ARBITER = '0x0D7B957C47Da86c2968dc52111D633D42cb7a5F7';
|
|
15
15
|
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
16
16
|
const MIN_SOURCE_COUNT = 2;
|
|
17
17
|
const MIN_DEADLINE_WINDOW_SECONDS = 12 * 60 * 60;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from 'viem';
|
|
12
12
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
13
13
|
|
|
14
|
-
const DEFAULT_ARBITER = '
|
|
14
|
+
const DEFAULT_ARBITER = '0x0D7B957C47Da86c2968dc52111D633D42cb7a5F7';
|
|
15
15
|
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
|
|
16
16
|
const MIN_SOURCE_COUNT = 2;
|
|
17
17
|
const MIN_DEADLINE_WINDOW_SECONDS = 12 * 60 * 60;
|