Function current_account_id

Source
pub fn current_account_id() -> AccountId
Expand description

The id of the account that owns the current contract.

ยงExamples

use near_sdk::env::current_account_id;
use near_sdk::AccountId;
use std::str::FromStr;

assert_eq!(current_account_id(), "alice.near".parse::<AccountId>().unwrap());