From 2194aeebd098404c462e10bcfff63609c841352d Mon Sep 17 00:00:00 2001 From: xermicus Date: Mon, 13 May 2024 18:47:36 +0200 Subject: [PATCH] constant values for basefee and difficulty Signed-off-by: xermicus --- crates/llvm-context/src/polkavm/evm/context.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/llvm-context/src/polkavm/evm/context.rs b/crates/llvm-context/src/polkavm/evm/context.rs index 47c1078..c1a0acc 100644 --- a/crates/llvm-context/src/polkavm/evm/context.rs +++ b/crates/llvm-context/src/polkavm/evm/context.rs @@ -109,12 +109,12 @@ where /// Translates the `difficulty` instruction. pub fn difficulty<'ctx, D>( - _context: &mut Context<'ctx, D>, + context: &mut Context<'ctx, D>, ) -> anyhow::Result> where D: Dependency + Clone, { - todo!() + Ok(context.word_const(2500000000000000).as_basic_value_enum()) } /// Translates the `coinbase` instruction. @@ -129,12 +129,12 @@ where /// Translates the `basefee` instruction. pub fn basefee<'ctx, D>( - _context: &mut Context<'ctx, D>, + context: &mut Context<'ctx, D>, ) -> anyhow::Result> where D: Dependency + Clone, { - todo!() + Ok(context.word_const(0).as_basic_value_enum()) } /// Translates the `msize` instruction.