Struct near_primitives_core::account::FunctionCallPermission [−][src]
pub struct FunctionCallPermission {
pub allowance: Option<Balance>,
pub receiver_id: String,
pub method_names: Vec<String>,
}
Expand description
Grants limited permission to make transactions with FunctionCallActions The permission can limit the allowed balance to be spent on the prepaid gas. It also restrict the account ID of the receiver for this function call. It also can restrict the method name for the allowed function calls.
Fields
allowance: Option<Balance>
Allowance is a balance limit to use by this access key to pay for function call gas and
transaction fees. When this access key is used, both account balance and the allowance is
decreased by the same value.
None
means unlimited allowance.
NOTE: To change or increase the allowance, the old access key needs to be deleted and a new
access key should be created.
receiver_id: String
The access key only allows transactions with the given receiver’s account id.
method_names: Vec<String>
A list of method names that can be used. The access key only allows transactions with the function call of one of the given method names. Empty list means any method name can be used.
Trait Implementations
impl BorshDeserialize for FunctionCallPermission where
Option<Balance>: BorshDeserialize,
String: BorshDeserialize,
Vec<String>: BorshDeserialize,
impl BorshDeserialize for FunctionCallPermission where
Option<Balance>: BorshDeserialize,
String: BorshDeserialize,
Vec<String>: BorshDeserialize,
impl BorshSerialize for FunctionCallPermission where
Option<Balance>: BorshSerialize,
String: BorshSerialize,
Vec<String>: BorshSerialize,
impl BorshSerialize for FunctionCallPermission where
Option<Balance>: BorshSerialize,
String: BorshSerialize,
Vec<String>: BorshSerialize,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for FunctionCallPermission
impl Send for FunctionCallPermission
impl Sync for FunctionCallPermission
impl Unpin for FunctionCallPermission
impl UnwindSafe for FunctionCallPermission
Blanket Implementations
Mutably borrows from an owned value. Read more