Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
Refacto BlockInfo and revert when OOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Nov 3, 2023
1 parent e5d4cc3 commit dc58b3b
Show file tree
Hide file tree
Showing 7 changed files with 281 additions and 513 deletions.
2 changes: 0 additions & 2 deletions src/kakarot/constants.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ namespace Constants {
// BLOCK
// CHAIN_ID = KKRT (0x4b4b5254) in ASCII
const CHAIN_ID = 1263227476;
// Coinbase address is the address of the sequencer
const MOCK_COINBASE_ADDRESS = 0x388ca486b82e20cc81965d056b4cdcaacdffe0cf08e20ed8ba10ea97a487004;
// Hardcode block gas limit to 20M
const BLOCK_GAS_LIMIT = 20000000;
Expand Down
18 changes: 9 additions & 9 deletions src/kakarot/evm.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -221,23 +221,23 @@ namespace EVM {
ret;
call EnvironmentalInformation.exec_extcodehash; // 0x3f
ret;
call BlockInformation.exec_blockhash; // 0x40
call BlockInformation.exec_block_information; // 0x40
ret;
call BlockInformation.exec_coinbase; // 0x41
call BlockInformation.exec_block_information; // 0x41
ret;
call BlockInformation.exec_timestamp; // 0x42
call BlockInformation.exec_block_information; // 0x42
ret;
call BlockInformation.exec_number; // 0x43
call BlockInformation.exec_block_information; // 0x43
ret;
call BlockInformation.exec_difficulty; // 0x44
call BlockInformation.exec_block_information; // 0x44
ret;
call BlockInformation.exec_gaslimit; // 0x45
call BlockInformation.exec_block_information; // 0x45
ret;
call BlockInformation.exec_chainid; // 0x46
call BlockInformation.exec_block_information; // 0x46
ret;
call BlockInformation.exec_selfbalance; // 0x47
call BlockInformation.exec_block_information; // 0x47
ret;
call BlockInformation.exec_basefee; // 0x48
call BlockInformation.exec_block_information; // 0x48
ret;
call unknown_opcode; // 0x49
ret;
Expand Down
Loading

0 comments on commit dc58b3b

Please sign in to comment.