From 9e6446a3014c02ee3d9d29ade638db6beaa39a01 Mon Sep 17 00:00:00 2001 From: Tiyo Date: Thu, 14 Dec 2023 22:42:02 +0800 Subject: [PATCH] add arb indexerUrl --- packages/client/src/mud/supportedChains.ts | 1 + packages/client/src/pages/game/index.tsx | 2 +- packages/contracts/worlds.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/client/src/mud/supportedChains.ts b/packages/client/src/mud/supportedChains.ts index 11e32cc..5c94584 100644 --- a/packages/client/src/mud/supportedChains.ts +++ b/packages/client/src/mud/supportedChains.ts @@ -15,6 +15,7 @@ import { sepolia, arbitrumGoerli } from 'viem/chains' arbitrumGoerli.rpcUrls.default.http = ['https://arbitrum-goerli.publicnode.com']; arbitrumGoerli.rpcUrls.default.webSocket = [ 'wss://arbitrum-goerli.publicnode.com']; +arbitrumGoerli.indexerUrl = [ 'https://indexer_arb.0xmssp.xyz']; const testnet = { name: "Mississippi testnet", diff --git a/packages/client/src/pages/game/index.tsx b/packages/client/src/pages/game/index.tsx index 4055243..fd0adb1 100644 --- a/packages/client/src/pages/game/index.tsx +++ b/packages/client/src/pages/game/index.tsx @@ -144,7 +144,7 @@ const Game = () => { let lastBattleTime = playerItem.lastBattleTime let diff = now - lastBattleTime let diffHp = diff * (playerItem.maxHp / 1000) - playerItem.hp = playerItem.hp + diffHp + playerItem.hp = Math.floor(playerItem.hp + diffHp) if (playerItem.hp > playerItem.maxHp) { playerItem.hp = playerItem.maxHp } diff --git a/packages/contracts/worlds.json b/packages/contracts/worlds.json index 7d67d6a..672c04e 100644 --- a/packages/contracts/worlds.json +++ b/packages/contracts/worlds.json @@ -4,7 +4,7 @@ "blockNumber": 1505273 }, "31337": { - "address": "0x7bd472fc101d3a7caf3064b7c5788965cb34685f" + "address": "0xe233198863b75acc6e1af43daff3f5918e35875e" }, "33784": { "address": "0x6e9474e9c83676b9a71133ff96db43e7aa0a4342",