Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust reward distribution phase for v1.1 #566

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion contracts/game/src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,16 @@ mod Game {
self._collectible_beasts.write(collectible_beasts);
self._terminal_timestamp.write(terminal_timestamp);
self._genesis_block.write(starknet::get_block_info().unbox().block_number.into());
self._genesis_timestamp.write(starknet::get_block_info().unbox().block_timestamp.into());

// On mainnet, set genesis timestamp to LSV1.0 genesis to preserve same reward distribution schedule for V1.1
let chain_id = starknet::get_execution_info().unbox().tx_info.unbox().chain_id;
if chain_id == MAINNET_CHAIN_ID {
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());
};


// set the golden token address
self._golden_token.write(golden_token_address);
Expand Down
Loading