Struct near_primitives::account::FunctionCallPermission
source · pub struct FunctionCallPermission {
pub allowance: Option<u128>,
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<u128>
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§
source§impl BorshDeserialize for FunctionCallPermission
impl BorshDeserialize for FunctionCallPermission
fn deserialize_reader<__R>(
reader: &mut __R
) -> Result<FunctionCallPermission, Error>where
__R: Read,
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl Clone for FunctionCallPermission
impl Clone for FunctionCallPermission
source§fn clone(&self) -> FunctionCallPermission
fn clone(&self) -> FunctionCallPermission
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FunctionCallPermission
impl Debug for FunctionCallPermission
source§impl<'de> Deserialize<'de> for FunctionCallPermission
impl<'de> Deserialize<'de> for FunctionCallPermission
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<FunctionCallPermission, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<FunctionCallPermission, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Hash for FunctionCallPermission
impl Hash for FunctionCallPermission
source§impl PartialEq for FunctionCallPermission
impl PartialEq for FunctionCallPermission
source§fn eq(&self, other: &FunctionCallPermission) -> bool
fn eq(&self, other: &FunctionCallPermission) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for FunctionCallPermission
impl Serialize for FunctionCallPermission
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for FunctionCallPermission
impl StructuralPartialEq for FunctionCallPermission
Auto Trait Implementations§
impl Freeze for FunctionCallPermission
impl RefUnwindSafe for FunctionCallPermission
impl Send for FunctionCallPermission
impl Sync for FunctionCallPermission
impl Unpin for FunctionCallPermission
impl UnwindSafe for FunctionCallPermission
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more