Reading from NEAR testnet…
Reading from NEAR testnet…
GyPrMgJztpL7Uu82oxzvjtABUuUpd31963n3FyzbNefr
manish_hr144.testnet to v1.social08.testnet
set() with 0.0105 NEAR
{
"data": {
"manish_hr144.testnet": {
"widget": {
"casino": {
"": "const Big = (n) => {\n const val = typeof n === \"string\" ? parseFloat(n) : n;\n return {\n mul: (d) => (val * d).toString(),\n div: (d) => (val / d).toFixed(2),\n };\n};\n\nconst contractId = \"casino1234567.testnet\";\nconst accountId = context.accountId;\n\nif (!state.status) {\n const status = Near.view(contractId, \"get_game_status\", {}) || {};\n const preview = Near.view(contractId, \"calculate_current_points\", {\n amount_near: 1,\n });\n const userBet = accountId\n ? Near.view(contractId, \"get_user_bet\", {\n user_id: accountId,\n team: \"A\",\n })\n : null;\n const isBanned = accountId\n ? Near.view(contractId, \"is_player_banned\", { player_id: accountId })\n : false;\n const bannedPlayers = Near.view(contractId, \"get_banned_players\", {});\n const adminInfo = Near.view(contractId, \"get_admin_info\", {});\n const teamABets = Near.view(contractId, \"get_team_bets\", { team: \"A\" });\n const teamBBets = Near.view(contractId, \"get_team_bets\", { team: \"B\" });\n\n State.update({\n team: \"A\",\n betAmount: \"\",\n pot: \"\",\n commission: \"\",\n duration: \"\",\n banUser: \"\",\n unbanUser: \"\",\n status,\n preview,\n userBet,\n isBanned,\n bannedPlayers,\n adminInfo,\n teamABets,\n teamBBets,\n });\n}\n\nconst isAdmin = state.status && state.status.admin === accountId;\n\nconst call = (method, args, gas, deposit) => {\n Near.call(contractId, method, args || {}, gas, deposit || 0);\n};\n\nconst bet = () => {\n if (!accountId || state.isBanned) return;\n const amount = parseFloat(state.betAmount);\n if (isNaN(amount) || amount < 0.5) {\n State.update({ error: \"⚠️ Minimum bet is 0.5 NEAR\" });\n return;\n }\n const yocto = Big(amount).mul(1e24);\n State.update({ error: null });\n call(\"bet_on_team\", { team: state.team }, \"100000000000000\", yocto);\n};\n\nconst withdraw = () => {\n if (!accountId || state.isBanned) return;\n call(\"withdraw\", {}, \"30000000000000\");\n};\n\nreturn (\n <div className=\"p-4 bg-dark text-white rounded\" style={{ maxWidth: \"650px\" }}>\n <h3 className=\"mb-3\">🎰 NEAR Casino Betting Game</h3>\n\n {!accountId && (\n <div className=\"alert alert-info\">\n 🔐 Connect your NEAR wallet to play.\n </div>\n )}\n {state.isBanned && (\n <div className=\"alert alert-danger\">\n 🚫 You are banned from playing or withdrawing.\n </div>\n )}\n\n {accountId && !state.isBanned && (\n <>\n <div className=\"mb-3\">\n <label>Choose Team:</label>\n <select\n value={state.team}\n onChange={(e) => State.update({ team: e.target.value })}\n className=\"form-select form-select-sm w-auto d-inline ms-2\"\n >\n <option value=\"A\">Team A</option>\n <option value=\"B\">Team B</option>\n </select>\n <input\n type=\"number\"\n min=\"0.5\"\n step=\"0.1\"\n className=\"form-control form-control-sm d-inline-block w-auto ms-3\"\n style={{ maxWidth: \"100px\" }}\n placeholder=\"Ⓝ Amount\"\n value={state.betAmount}\n onChange={(e) => State.update({ betAmount: e.target.value })}\n />\n <button className=\"btn btn-success btn-sm ms-2\" onClick={bet}>\n Place Bet\n </button>\n {state.error && (\n <div className=\"text-danger small mt-1\">{state.error}</div>\n )}\n </div>\n\n {state.userBet && (\n <div className=\"text-light small mb-3\">\n <b>Your Bet:</b>\n <br />• Team: {state.userBet.team}\n <br />• Amount: {Big(state.userBet.amount).div(1e24)} NEAR\n <br />• Points: {state.userBet.points}\n <br />• Withdrawable: {Big(state.userBet.withdrawable).div(\n 1e24\n )}{\" \"}\n NEAR\n </div>\n )}\n\n <button className=\"btn btn-warning btn-sm\" onClick={withdraw}>\n 💸 Withdraw\n </button>\n </>\n )}\n\n <hr className=\"border-secondary mt-4 mb-3\" />\n\n <h6>📊 Game Status</h6>\n {state.status ? (\n <div className=\"text-light small mb-2\">\n <div>\n <b>Admin:</b> {state.status.admin}\n </div>\n <div>\n <b>Paused:</b> {state.status.paused ? \"Yes\" : \"No\"}\n </div>\n <div>\n <b>Active:</b> {state.status.active_game ? \"Yes\" : \"No\"}\n </div>\n <div>\n <b>Refund Mode:</b> {state.status.refund_mode ? \"Yes\" : \"No\"}\n </div>\n <div>\n <b>Pot Size:</b> {state.status.pot_size} NEAR\n </div>\n <div>\n <b>Commission:</b> {state.status.commission_rate}%\n </div>\n <div>\n <b>Duration:</b> {state.status.game_duration} sec\n </div>\n <div>\n <b>Team A Points:</b> {state.status.team_a_points || 0}\n </div>\n <div>\n <b>Team B Points:</b> {state.status.team_b_points || 0}\n </div>\n <div>\n <b>Preview Points:</b> {state.preview} pts/NEAR\n </div>\n </div>\n ) : (\n <div>Loading status...</div>\n )}\n\n {isAdmin && (\n <>\n <hr className=\"border-secondary mt-4 mb-3\" />\n <h6>🛠 Admin Panel</h6>\n\n <div className=\"mb-2\">\n <button\n className=\"btn btn-primary btn-sm me-2\"\n onClick={() => call(\"start_game\", {}, \"50000000000000\")}\n >\n ▶️ Start Game\n </button>\n <button\n className=\"btn btn-danger btn-sm me-2\"\n onClick={() => call(\"end_game\", {}, \"120000000000000\")}\n >\n 🛑 End Game\n </button>\n <button\n className=\"btn btn-secondary btn-sm me-2\"\n onClick={() => call(\"pause_game\", {}, \"20000000000000\")}\n >\n ⏸ Pause\n </button>\n <button\n className=\"btn btn-success btn-sm me-2\"\n onClick={() => call(\"unpause_game\", {}, \"20000000000000\")}\n >\n ▶️ Unpause\n </button>\n <button\n className=\"btn btn-warning btn-sm\"\n onClick={() => call(\"force_end_game_refund\", {}, \"100000000000000\")}\n >\n 💸 Force Refund\n </button>\n </div>\n\n <div className=\"mb-3 mt-3\">\n <input\n placeholder=\"Pot Size (NEAR)\"\n type=\"number\"\n className=\"form-control form-control-sm mb-2\"\n value={state.pot}\n onChange={(e) => State.update({ pot: e.target.value })}\n />\n <button\n className=\"btn btn-outline-light btn-sm\"\n onClick={() =>\n call(\n \"set_pot_size\",\n { pot_size: parseInt(state.pot) },\n \"20000000000000\"\n )\n }\n >\n Set Pot Size\n </button>\n </div>\n\n <div className=\"mb-3\">\n <input\n placeholder=\"Commission % (0–50)\"\n type=\"number\"\n className=\"form-control form-control-sm mb-2\"\n value={state.commission}\n onChange={(e) => State.update({ commission: e.target.value })}\n />\n <button\n className=\"btn btn-outline-light btn-sm\"\n onClick={() =>\n call(\n \"set_commission_rate\",\n { rate: parseInt(state.commission) },\n \"20000000000000\"\n )\n }\n >\n Set Commission\n </button>\n </div>\n\n <div className=\"mb-3\">\n <input\n placeholder=\"Duration (seconds)\"\n type=\"number\"\n className=\"form-control form-control-sm mb-2\"\n value={state.duration}\n onChange={(e) => State.update({ duration: e.target.value })}\n />\n <button\n className=\"btn btn-outline-light btn-sm\"\n onClick={() =>\n call(\n \"set_game_duration\",\n { duration_seconds: parseInt(state.duration) },\n \"20000000000000\"\n )\n }\n >\n Set Duration\n </button>\n </div>\n\n <div className=\"mb-3\">\n <input\n placeholder=\"Ban account (e.g. baduser.testnet)\"\n className=\"form-control form-control-sm mb-2\"\n value={state.banUser}\n onChange={(e) => State.update({ banUser: e.target.value })}\n />\n <button\n className=\"btn btn-outline-danger btn-sm\"\n onClick={() =>\n call(\"ban_player\", { player_id: state.banUser }, \"20000000000000\")\n }\n >\n Ban Player\n </button>\n </div>\n\n <div className=\"mb-2\">\n <input\n placeholder=\"Unban account\"\n className=\"form-control form-control-sm mb-2\"\n value={state.unbanUser}\n onChange={(e) => State.update({ unbanUser: e.target.value })}\n />\n <button\n className=\"btn btn-outline-success btn-sm\"\n onClick={() =>\n call(\n \"unban_player\",\n { player_id: state.unbanUser },\n \"20000000000000\"\n )\n }\n >\n Unban Player\n </button>\n </div>\n </>\n )}\n\n <hr className=\"border-secondary mt-4\" />\n <div className=\"text-light small\">\n <h6>📈 Team Bets</h6>\n <b>Team A:</b> {state.teamABets ? state.teamABets.length : 0} bets\n <br />\n <b>Team B:</b> {state.teamBBets ? state.teamBBets.length : 0} bets\n </div>\n </div>\n);\n",
"metadata": {
"image": {}
}
}
}
}
}
}1 automatic refund step from the network not shown.
This page reads FastNEAR's public transaction index and stores nothing. This command asks a NEAR archival node for the same transaction and needs no keys.
curl -s https://archival-rpc.testnet.fastnear.com -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tx","params":{"tx_hash":"GyPrMgJztpL7Uu82oxzvjtABUuUpd31963n3FyzbNefr","sender_account_id":"manish_hr144.testnet","wait_until":"FINAL"}}'Vouch has its own page because testnet.nearblocks.io stopped indexing on 27 Sep 2026, so it can't show newer transactions.