Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist committed Dec 29, 2024
1 parent 3d5cb4e commit bc34ace
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions near-sdk/src/environment/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,20 +891,20 @@ pub fn promise_and(promise_indices: &[PromiseIndex]) -> PromiseIndex {
///
/// Example:
/// ```no_run
/// use near_sdk::{env, NearToken, NearGas};
/// use near_sdk::{env, NearToken, Gas, AccountId};
///
/// let promise_index = env::promise_batch_create(
/// &AccountId::from_str("example.near").unwrap()
/// );
///
/// // Adding actions to the promise
/// env::promise_batch_action_transfer(promise_index, NearToken::fromNear(10u128)); // Transfer 10 NEAR
/// env::promise_batch_action_transfer(promise_index, NearToken::from_near(10u128)); // Transfer 10 NEAR
/// env::promise_batch_action_function_call(
/// promise_index,
/// "method_name", // Target method
/// b"{}", // Arguments
/// 0, // Attached deposit
/// NearGas::from_tgas(5) // Gas for execution
/// NearToken::from_near(0), // Attached deposit
/// Gas::from_tgas(5) // Gas for execution
/// );
/// ```
/// All actions in a batch are executed in the order they were added.
Expand Down
6 changes: 3 additions & 3 deletions near-sdk/src/types/vm_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ pub use near_vm_runner::logic::types::{PromiseResult as VmPromiseResult, ReturnD
/// Returned by [`promise_create`](crate::env::promise_create) and can be used to refer this promise in `promise_then`, `promise_batch_create`, and other functions.
/// Example:
/// ```no_run
/// use near_sdk::{env, NearGas};
/// use near_sdk::{env, Gas};
///
/// let promise_id = env::promise_create(
/// &AccountId::from_str("a.near").unwrap(), "new", b"{}", 0,
/// NearGas::from_tgas(1)
/// Gas::from_tgas(1)
/// );
/// env::promise_then(
/// promise_id, &AccountId::from_str("b.near").unwrap(), "callback", b"{}", 0,
/// NearGas::from_tgas(1)
/// Gas::from_tgas(1)
/// );
/// ```
#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Hash, Copy, Clone)]
Expand Down

0 comments on commit bc34ace

Please sign in to comment.