Skip to content

Commit

Permalink
use 11 block delay on testnet
Browse files Browse the repository at this point in the history
* this can be removed after v1.1 optimistic start feature iis vetted on Sepolia
  • Loading branch information
loothero committed Mar 11, 2024
1 parent 7d1cb4e commit 78621f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/game/src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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()
)
}

Expand Down

0 comments on commit 78621f9

Please sign in to comment.