kill-switch-mcp 1.2.15 → 1.3.1
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/server.js +6 -6
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -3929,7 +3929,7 @@ var TOURNAMENT_ABI = [
|
|
|
3929
3929
|
{
|
|
3930
3930
|
name: "hasDeposited",
|
|
3931
3931
|
type: "function",
|
|
3932
|
-
inputs: [{ name: "", type: "
|
|
3932
|
+
inputs: [{ name: "", type: "bytes32" }],
|
|
3933
3933
|
outputs: [{ name: "", type: "bool" }],
|
|
3934
3934
|
stateMutability: "view"
|
|
3935
3935
|
}
|
|
@@ -4081,11 +4081,12 @@ async function joinTournament(tournamentAddress, username) {
|
|
|
4081
4081
|
const have = formatUnits(balance, 6);
|
|
4082
4082
|
throw new Error(`Insufficient balance. Need $${needed} USDC, have $${have}.`);
|
|
4083
4083
|
}
|
|
4084
|
+
const usernameBytes = pad(stringToHex(username), { size: 32 });
|
|
4084
4085
|
const alreadyDeposited = await pub.readContract({
|
|
4085
4086
|
address: tournamentAddress,
|
|
4086
4087
|
abi: TOURNAMENT_ABI,
|
|
4087
4088
|
functionName: "hasDeposited",
|
|
4088
|
-
args: [
|
|
4089
|
+
args: [usernameBytes]
|
|
4089
4090
|
});
|
|
4090
4091
|
if (alreadyDeposited) {
|
|
4091
4092
|
throw new Error("You have already deposited in this tournament.");
|
|
@@ -4122,7 +4123,6 @@ async function joinTournament(tournamentAddress, username) {
|
|
|
4122
4123
|
}
|
|
4123
4124
|
}
|
|
4124
4125
|
await pub.waitForTransactionReceipt({ hash: approveHash });
|
|
4125
|
-
const usernameBytes = pad(stringToHex(username), { size: 32 });
|
|
4126
4126
|
const depositHash = await walletClient.writeContract({
|
|
4127
4127
|
address: tournamentAddress,
|
|
4128
4128
|
abi: TOURNAMENT_ABI,
|
|
@@ -4165,7 +4165,7 @@ YOU are the brain of your bot. Your human talks strategy, you execute it in the
|
|
|
4165
4165
|
|
|
4166
4166
|
1. \`login\` — connects to the game (creates account if needed)
|
|
4167
4167
|
2. \`join_game\` — shows available games and buy-in tiers, or joins an existing queued game
|
|
4168
|
-
3. \`wait_for_game_start\` —
|
|
4168
|
+
3. \`wait_for_game_start\` — waits up to 60s for the match to begin. **Loop this**: if it times out, check if you're still in lobby and call it again. Games can take minutes to fill.
|
|
4169
4169
|
4. \`execute_code\` — fight! Use \`bot\`, \`sdk\`, and \`actions\` globals.
|
|
4170
4170
|
|
|
4171
4171
|
Before writing any execute_code, read \`killswitch://sdk-reference\` for the complete API.
|
|
@@ -5042,7 +5042,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
5042
5042
|
if (!connection) {
|
|
5043
5043
|
return errorResponse("Not connected. Call login first.");
|
|
5044
5044
|
}
|
|
5045
|
-
const timeoutSecs = Math.min(Math.max(args?.timeout ||
|
|
5045
|
+
const timeoutSecs = Math.min(Math.max(args?.timeout || 60, 10), 600);
|
|
5046
5046
|
const ARENA_MIN_X = 3077;
|
|
5047
5047
|
const ARENA_MAX_X = 3134;
|
|
5048
5048
|
const ARENA_MIN_Z = 3324;
|
|
@@ -5074,7 +5074,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
|
5074
5074
|
}
|
|
5075
5075
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
5076
5076
|
}
|
|
5077
|
-
return errorResponse(`
|
|
5077
|
+
return errorResponse(`Still waiting for the match to begin (${timeoutSecs}s elapsed). The game needs 2+ players to start the countdown. Call wait_for_game_start again to keep waiting.`);
|
|
5078
5078
|
}
|
|
5079
5079
|
case "join_game": {
|
|
5080
5080
|
const connection = getActiveConnection();
|