status-im / nimplay

Nim Ethereum Contract DSL. Targeting eWASM.
MIT License
20 stars 5 forks source link

Support "Eth2 EE" EEI #1

Open axic opened 5 years ago

axic commented 5 years ago

It would be nice to support the EEI from Eth2 (look here) as that would allow writing execution environments in Nim.

jacqueswww commented 5 years ago

Ethereum Execution Environment Function Signatures:

loadPreStateRoot(memoryOffset: u32ptr)
The current pre_state_root (256-bit value) is loaded from the memory offset pointed at
blockDataSize() -> u32
Returns the size of the block.data
blockDataCopy(memoryOffset: u32ptr, offset: u32, length: u32)
Copies length bytes from block.data + offset to the memory offset
savePostStateRoot(memoryOffset: u32ptr)
The post_state_root (256-bit value) is set to the content of the memory offset pointed at
pushNewDeposit(memoryOffset: u32ptr, length: u32)