Skip to content

Commit

Permalink
update sc runtime && wasm test file
Browse files Browse the repository at this point in the history
  • Loading branch information
modship committed Aug 28, 2024
1 parent fd69b2e commit 67ad55f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ massa_wallet = { path = "./massa-wallet" }

# Massa projects dependencies
massa-proto-rs = { git = "https://github.com/massalabs/massa-proto-rs", "rev" = "38950875a7aa406fedc4f0b8336864e5ff290f2c" }
massa-sc-runtime = { git = "https://github.com/massalabs/massa-sc-runtime", "rev" = "116dd8a32819c8def8a5aa014f805ee2cab9f384" }
massa-sc-runtime = { git = "https://github.com/massalabs/massa-sc-runtime", "rev" = "7c0a48777c2481ceef62e1a1d2b989f6d001acc7" }


peernet = { git = "https://github.com/massalabs/PeerNet", "rev" = "04b05ddd320fbe76cc858115af7b5fc28bdb8310" }
Expand Down
4 changes: 2 additions & 2 deletions massa-execution-worker/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1270,15 +1270,15 @@ impl ExecutionState {
context.transfer_coins(None, Some(call.target_address), call.coins, false)
{
// coin crediting failed: reset context to snapshot and reimburse sender
return Err(ExecutionError::RuntimeError(format!(
return Err(ExecutionError::DeferredCallsError(format!(
"could not credit coins to target of deferred call execution: {}",
err
)));
}

// quit if there is no function to be called
if call.target_function.is_empty() {
return Err(ExecutionError::RuntimeError(
return Err(ExecutionError::DeferredCallsError(
"no function to call in the deferred call".to_string(),
));
}
Expand Down
9 changes: 4 additions & 5 deletions massa-execution-worker/src/interface_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1358,13 +1358,12 @@ impl Interface for InterfaceImpl {
/// Register deferred call
///
/// # Arguments
/// * target_slot: tuple containing the period and thread of the target slot
/// * target_addr: string representation of the target address
/// * target_func: string representation of the target function
/// * params: byte array of the parameters
/// * coins: the amount of coins to send
/// * fee: the amount of fee to send
/// * target_slot: tuple containing the period and thread of the target slot
/// * max_gas: the gas limit for the call
/// * coins: the amount of coins to send
/// * params: byte array of the parameters
///
/// # Returns
/// The id of the call
Expand All @@ -1374,8 +1373,8 @@ impl Interface for InterfaceImpl {
target_func: &str,
target_slot: (u64, u8),
max_gas: u64,
coins: u64,
params: &[u8],
coins: u64,
) -> Result<Vec<u8>> {
// This function spends coins + deferred_call_quote(target_slot, max_gas).unwrap() from the caller, fails if the balance is insufficient or if the quote would return None.

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 67ad55f

Please sign in to comment.