From 5deb561797b8c98177e30a7f045d829c214b5a40 Mon Sep 17 00:00:00 2001 From: Vladas Zakrevskis <146100@gmail.com> Date: Tue, 13 Feb 2024 12:40:11 +0200 Subject: [PATCH] docs: a way to get account with more than 100 near on sandbox --- workspaces/src/network/variants.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/workspaces/src/network/variants.rs b/workspaces/src/network/variants.rs index eb228cd8..798ed7ba 100644 --- a/workspaces/src/network/variants.rs +++ b/workspaces/src/network/variants.rs @@ -78,6 +78,18 @@ where (id, sk) } + /// Creates a top level developement account. + /// On sandbox network it has a balance of 100 Near. + /// If you need more Near for your tests in sandbox consider using `root_account()` method: + /// + /// # Examples + /// ``` + /// use near_workspaces::{result::Result, Account, network::Sandbox, Worker}; + /// fn get_account_with_lots_of_near(worker: &Worker) -> Result { + /// worker.root_account() + /// } + /// ``` + /// pub async fn dev_create_account(&self) -> Result { let (id, sk) = self.dev_generate().await; let account = self.create_tla(id.clone(), sk).await?;