Skip to content

Commit

Permalink
vm: add MOONLIGHT_SENDER available to session
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia committed Jan 10, 2025
1 parent 424b2d7 commit 99564c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vm/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Copyright (c) DUSK NETWORK. All rights reserved.

use blake2b_simd::Params;
use dusk_core::abi::{ContractError, ContractId, CONTRACT_ID_BYTES};
use dusk_core::abi::{ContractError, ContractId, Metadata, CONTRACT_ID_BYTES};
use dusk_core::transfer::{
data::ContractBytecode, Transaction, TRANSFER_CONTRACT,
};
Expand Down Expand Up @@ -73,6 +73,9 @@ pub fn execute(
// with gas limit smaller than deploy charge.
deploy_check(tx, gas_per_deploy_byte, min_deploy_gas_price)?;

let _ = session
.set_meta(Metadata::MOONLIGHT_SENDER, tx.moonlight_sender().copied());

// Spend the inputs and execute the call. If this errors the transaction is
// unspendable.
let mut receipt = session.call::<_, Result<Vec<u8>, ContractError>>(
Expand Down

0 comments on commit 99564c3

Please sign in to comment.