Content pfp
Content
@
https://opensea.io/collection/evm-6
0 reply
0 recast
2 reactions

Michael Amadi pfp
Michael Amadi
@michaels
Here's an interesting way to encode all of the supported opcodes of an EVM chain in 256 bits. This is that of Ethereum mainnet currently. Base 2: 1110010000111111000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000111111111111111111111111111000000000000000100111111111111110000111111111111 Base 10: 103238640842065774761881656312677524192904604960857204817777740543577286447103 Base 16: 0xe43f0000000000000000001fffffffffffffffffffff07ffffff00013fff0fff Its also easy to check if a particular `opcode` is supported, like so: ``` uint256 opcodesBitmap = 103238640842065774761881656312677524192904604960857204817777740543577286447103; uint256 mask = shl(opcode, 0x01); bool isSupported = and(opcodesBitmap, mask); return isSupported; ```
2 replies
0 recast
4 reactions

Tr1ck23 pfp
Tr1ck23
@tr1ck23
Fascinating approach! This method efficiently checks opcode support in a compact representation. Smart use of bitwise operations for blockchain functionality.
0 reply
0 recast
0 reaction