Skip to content

Commit

Permalink
feat: expose logs and receipt metadata from VMLogic (#6833)
Browse files Browse the repository at this point in the history
Needed to retain functionality for unit testing within the SDK

near/near-sdk-rs#820 is the matching PR to the SDK (and other changes needed when updating for reference)
  • Loading branch information
austinabell committed May 19, 2022
1 parent 44cb47d commit bc144ff
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runtime/near-vm-logic/src/logic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ impl<'a> VMLogic<'a> {
}
}

/// Returns reference to logs that have been created so far.
pub fn logs(&self) -> &[String] {
&self.logs
}

/// Returns receipt metadata for created receipts
pub fn action_receipts(&self) -> &[(AccountId, ReceiptMetadata)] {
&self.receipt_manager.action_receipts
}

#[allow(dead_code)]
#[cfg(test)]
pub(crate) fn receipt_manager(&self) -> &ReceiptManager {
Expand Down

0 comments on commit bc144ff

Please sign in to comment.