Skip to content

Instantly share code, notes, and snippets.

@the-pesar
Created September 27, 2024 12:35
Show Gist options
  • Save the-pesar/cafee664d6bafc5915760e762ace528e to your computer and use it in GitHub Desktop.
Save the-pesar/cafee664d6bafc5915760e762ace528e to your computer and use it in GitHub Desktop.
Withdraw hamster airdrop
const token = "$token" // replace your token to $token
const headers = {
Authorization: token,
}
async function delay(ms) {
return new Promise((reslove) => setTimeout(() => reslove(true), ms))
}
let pend = true
async function claim() {
const res = await fetch(
"https://api.hamsterkombatgame.io/interlude/onchain/queue",
{ headers, method: "POST" }
)
const data = await res.json()
if (data.createTransaction) {
pend = false
alert("درخواست برداشت ارسال شد.")
} else {
console.log("درحال انجام...");
}
}
async function start() {
do {
claim()
await delay(500)
} while (pend)
}
start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment