diff --git a/indexer/env-sepolia b/indexer/env-sepolia
index 9a2f23753..954f39509 100644
--- a/indexer/env-sepolia
+++ b/indexer/env-sepolia
@@ -1,4 +1,4 @@
-GAME="0x02b66531874c952844913b8cbc573878c794112b546cbf39409013e33d4777fe"
+GAME="0x00e55a2cde54c0051a72e44e81ddeed12103cc1cd1a20dc14fe52520e69b14ea"
START=60000
MONGO_CONNECTION_STRING="mongodb://mongo:mongo@mongo:27017"
MONGO_DB="mongo"
diff --git a/indexer/graphql/Dockerfile.sepolia b/indexer/graphql/Dockerfile.sepolia
index 344e9fb3a..3afc262af 100644
--- a/indexer/graphql/Dockerfile.sepolia
+++ b/indexer/graphql/Dockerfile.sepolia
@@ -11,4 +11,4 @@ RUN python3 -m pip install pycryptodome
RUN poetry config virtualenvs.create false
RUN poetry install
-ENTRYPOINT [ "indexer", "graphql", "--mongo", "mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@54.74.126.103:27017", "--port", "8080" ]
+ENTRYPOINT [ "indexer", "graphql", "--mongo", "mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@34.245.17.93:27017", "--port", "8080" ]
diff --git a/indexer/restart-compose-sepolia.sh b/indexer/restart-compose-sepolia.sh
new file mode 100644
index 000000000..30a3a12f7
--- /dev/null
+++ b/indexer/restart-compose-sepolia.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# Path to your docker-compose.yml file
+COMPOSE_PATH="sepolia-compose.yaml"
+
+# Container names (as specified in docker-compose.yml)
+CONTAINER_NAMES=("indexer-adventurers_indexer-1" "indexer-battles_indexer-1" "indexer-beasts_indexer-1" "indexer-discoveries_indexer-1" "indexer-items_indexer-1" "indexer-scores_indexer-1")
+
+# Time to wait between checks (5mins / 300 seconds)
+INTERVAL=300
+
+# Check if a block has been processed in the last minute
+check_container_activity() {
+ local CONTAINER_NAME="$1"
+ LAST_LOG=$(docker logs "$CONTAINER_NAME" 2>&1 | tail -1) # Assuming you want the last log entry
+ echo "Extracted log: $LAST_LOG" # Print timestamp for verification
+ LAST_TIMESTAMP=$(echo "$LAST_LOG" | sed -E 's/\x1B\[[0-9;]*[JKmsu]//g' | cut -d' ' -f1)
+
+ echo "Extracted timestamp: $LAST_TIMESTAMP" # Print timestamp for verification
+
+ # Convert timestamp to epoch (seconds since 1970)
+ LAST_EPOCH=$(date -d "$LAST_TIMESTAMP" +%s)
+ CURRENT_EPOCH=$(date +%s)
+ echo "Current time difference: $((CURRENT_EPOCH - LAST_EPOCH)) seconds"
+
+ # If the difference is more than the interval, return 1 (unhealthy)
+ if (( CURRENT_EPOCH - LAST_EPOCH > INTERVAL )); then
+ return 1
+ else
+ return 0
+ fi
+}
+
+while true; do
+ for CONTAINER_NAME in "${CONTAINER_NAMES[@]}"; do
+ if ! check_container_activity "$CONTAINER_NAME"; then
+ echo "Container $CONTAINER_NAME seems to be stuck. Restarting..."
+ docker-compose -f $COMPOSE_PATH stop "$CONTAINER_NAME"
+ docker-compose -f $COMPOSE_PATH up -d "$CONTAINER_NAME"
+ # # Add a notification mechanism here if needed
+ fi
+ done
+ sleep $INTERVAL
+done
diff --git a/ui/.env.preview b/ui/.env.preview
index 9f24bc390..42db98370 100644
--- a/ui/.env.preview
+++ b/ui/.env.preview
@@ -4,7 +4,7 @@ NEXT_PUBLIC_RPC_API_KEY=efb20d63-c5e0-4f5d-ab72-ef7add92779f
NEXT_PUBLIC_LS_GQL_URL=https://survivor-sepolia-indexer.realms.world/graphql
NEXT_PUBLIC_TOKENS_GQL_URL=https://testnet.realms.world/api/graphql
NEXT_PUBLIC_ETH_ADDRESS=0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
-NEXT_PUBLIC_GAME_ADDRESS=0x02b66531874c952844913b8cbc573878c794112b546cbf39409013e33d4777fe
+NEXT_PUBLIC_GAME_ADDRESS=0x027069eaf29f2db58ff8321b58f162b9e8365304688fd96b01f1a0dd17d07fd3
NEXT_PUBLIC_OLD_GAME_ADDRESS=0x0
NEXT_PUBLIC_LORDS_ADDRESS=0x019c92fa87f4d5e3be25c3dd6a284f30282a07e87cd782f5fd387b82c8142017
NEXT_PUBLIC_BEASTS_ADDRESS=0x020c7c02c973ffa3a48fb78e9472b679c72c11b59512f524154ade0a39f54136
diff --git a/ui/package.json b/ui/package.json
index c7ba1d0fc..09eaf2c30 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -18,6 +18,7 @@
"@types/node": "18.15.11",
"@types/react": "18.0.31",
"@types/react-dom": "18.0.11",
+ "@vercel/analytics": "^1.2.2",
"autoprefixer": "^10.4.14",
"class-variance-authority": "^0.4.0",
"clsx": "^1.2.1",
diff --git a/ui/src/app/components/start/Spawn.tsx b/ui/src/app/components/start/Spawn.tsx
index 1e29102d8..446097c75 100644
--- a/ui/src/app/components/start/Spawn.tsx
+++ b/ui/src/app/components/start/Spawn.tsx
@@ -112,9 +112,11 @@ export const Spawn = ({
}
};
- const onMainnet = process.env.NEXT_PUBLIC_NETWORK === "mainnet";
+ const onMainnet =
+ process.env.NEXT_PUBLIC_NETWORK === "mainnet" ||
+ process.env.NEXT_PUBLIC_NETWORK === "sepolia";
- const waitEstimate = 12 * averageBlockTime; // add one for closer estimate
+ const waitEstimate = 2 * averageBlockTime;
const { data: blockData } = useBlock({
refetchInterval: false,
@@ -130,6 +132,8 @@ export const Spawn = ({
setFetchedAverageBlockTime(true);
};
+ console.log(averageBlockTime);
+
useEffect(() => {
if (onMainnet && !fetchedAverageBlockTime && currentBlockNumber > 0) {
fetchData();
diff --git a/ui/src/app/containers/BeastScreen.tsx b/ui/src/app/containers/BeastScreen.tsx
index 7912210ff..f1810e33c 100644
--- a/ui/src/app/containers/BeastScreen.tsx
+++ b/ui/src/app/containers/BeastScreen.tsx
@@ -52,7 +52,9 @@ export default function BeastScreen({
(state) => state.data.battlesByBeastQuery?.battles || []
);
- const mainnetBotProtection = process.env.NEXT_PUBLIC_NETWORK === "mainnet";
+ const mainnetBotProtection =
+ process.env.NEXT_PUBLIC_NETWORK === "mainnet" ||
+ process.env.NEXT_PUBLIC_NETWORK === "sepolia";
const { data: blockData } = useBlock({
refetchInterval:
@@ -96,7 +98,12 @@ export default function BeastScreen({
label: "TILL DEATH",
action: async () => {
resetNotification();
- await attack(true, beastData);
+ if (adventurer?.level === 1) {
+ const entropyBlockData = await getBlock(adventurer?.startBlock! + 1);
+ await attack(true, beastData, entropyBlockData?.block_hash ?? 0);
+ } else {
+ await attack(true, beastData);
+ }
},
disabled:
adventurer?.beastHealth == undefined ||
@@ -184,7 +191,7 @@ export default function BeastScreen({
const currentBlockNumber = (blockData as Block)?.block_number ?? 0;
const revealBlockReached =
- currentBlockNumber >= (adventurer?.revealBlock ?? 0);
+ currentBlockNumber >= (adventurer?.revealBlock! + 1 ?? 0);
useEffect(() => {
if (revealBlockReached) {
@@ -197,6 +204,8 @@ export default function BeastScreen({
return