From bc34aced4ab9e6277ff2fd564b66bb429057d526 Mon Sep 17 00:00:00 2001 From: polyprogrammist Date: Mon, 30 Dec 2024 01:02:08 +0800 Subject: [PATCH] fix tests --- near-sdk/src/environment/env.rs | 8 ++++---- near-sdk/src/types/vm_types.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/near-sdk/src/environment/env.rs b/near-sdk/src/environment/env.rs index b3374f805..45771ecbe 100644 --- a/near-sdk/src/environment/env.rs +++ b/near-sdk/src/environment/env.rs @@ -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. diff --git a/near-sdk/src/types/vm_types.rs b/near-sdk/src/types/vm_types.rs index 9a241682b..6d28dd999 100644 --- a/near-sdk/src/types/vm_types.rs +++ b/near-sdk/src/types/vm_types.rs @@ -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)]