From 78621f9924741cafad320e9d5d892bccbeb50467 Mon Sep 17 00:00:00 2001 From: loothero Date: Mon, 11 Mar 2024 06:39:41 +0000 Subject: [PATCH] use 11 block delay on testnet * this can be removed after v1.1 optimistic start feature iis vetted on Sepolia --- contracts/game/src/lib.cairo | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contracts/game/src/lib.cairo b/contracts/game/src/lib.cairo index 0f21c7c05..164ed518c 100644 --- a/contracts/game/src/lib.cairo +++ b/contracts/game/src/lib.cairo @@ -173,10 +173,11 @@ mod Game { self._genesis_timestamp.write(1699552291); } else { // on non-mainnet, use the current block timestamp so tests run correctly - self._genesis_timestamp.write(starknet::get_block_info().unbox().block_timestamp.into()); + self + ._genesis_timestamp + .write(starknet::get_block_info().unbox().block_timestamp.into()); }; - // set the golden token address self._golden_token.write(golden_token_address); @@ -3046,7 +3047,7 @@ mod Game { #[inline(always)] fn _get_testnet_entropy(adventurer_id: felt252, start_block: u64) -> felt252 { ImplAdventurer::get_entropy( - adventurer_id, starknet::get_block_hash_syscall(start_block - 10).unwrap_syscall() + adventurer_id, starknet::get_block_hash_syscall(start_block + 1).unwrap_syscall() ) }