use crate::{
interpreter_types::{InterpreterTypes, RuntimeFlag, StackTr},
Host,
};
use crate::InstructionContext;
pub fn gasprice<WIRE: InterpreterTypes, H: Host + ?Sized>(
context: InstructionContext<'_, H, WIRE>,
) {
push!(context.interpreter, context.host.effective_gas_price());
}
pub fn origin<WIRE: InterpreterTypes, H: Host + ?Sized>(context: InstructionContext<'_, H, WIRE>) {
push!(
context.interpreter,
context.host.caller().into_word().into()
);
}
pub fn blob_hash<WIRE: InterpreterTypes, H: Host + ?Sized>(
context: InstructionContext<'_, H, WIRE>,
) {
check!(context.interpreter, CANCUN);
popn_top!([], index, context.interpreter);
let i = as_usize_saturated!(*index);
*index = context.host.blob_hash(i).unwrap_or_default();
}