Function signer_account_id

Source
pub fn signer_account_id() -> AccountId
Expand description

The id of the account that either signed the original transaction or issued the initial cross-contract call.

ยงExamples

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

assert_eq!(signer_account_id(), "bob.near".parse::<AccountId>().unwrap());