pub struct DelegateAction {
pub actions: Vec<NonDelegateAction>,
pub max_block_height: u64,
pub nonce: u64,
pub public_key: PublicKey,
pub receiver_id: AccountId,
pub sender_id: AccountId,
}Expand description
This action allows to execute the inner actions behalf of the defined sender.
JSON schema
{
"description": "This action allows to execute the inner actions behalf of the defined sender.",
"type": "object",
"required": [
"actions",
"max_block_height",
"nonce",
"public_key",
"receiver_id",
"sender_id"
],
"properties": {
"actions": {
"description": "List of actions to be executed.\n\n With the meta transactions MVP defined in NEP-366, nested\n DelegateActions are not allowed. A separate type is used to enforce it.",
"type": "array",
"items": {
"$ref": "#/components/schemas/NonDelegateAction"
}
},
"max_block_height": {
"description": "The maximal height of the block in the blockchain below which the given DelegateAction is valid.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"nonce": {
"description": "Nonce to ensure that the same delegate action is not sent twice by a\n relayer and should match for given account's `public_key`.\n After this action is processed it will increment.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"public_key": {
"description": "Public key used to sign this delegated action.",
"allOf": [
{
"$ref": "#/components/schemas/PublicKey"
}
]
},
"receiver_id": {
"description": "Receiver of the delegated actions.",
"allOf": [
{
"$ref": "#/components/schemas/AccountId"
}
]
},
"sender_id": {
"description": "Signer of the delegated actions",
"allOf": [
{
"$ref": "#/components/schemas/AccountId"
}
]
}
}
}Fields§
§actions: Vec<NonDelegateAction>List of actions to be executed.
With the meta transactions MVP defined in NEP-366, nested DelegateActions are not allowed. A separate type is used to enforce it.
max_block_height: u64The maximal height of the block in the blockchain below which the given DelegateAction is valid.
nonce: u64Nonce to ensure that the same delegate action is not sent twice by a
relayer and should match for given account’s public_key.
After this action is processed it will increment.
public_key: PublicKeyPublic key used to sign this delegated action.
receiver_id: AccountIdReceiver of the delegated actions.
sender_id: AccountIdSigner of the delegated actions
Trait Implementations§
Source§impl Clone for DelegateAction
impl Clone for DelegateAction
Source§fn clone(&self) -> DelegateAction
fn clone(&self) -> DelegateAction
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DelegateAction
impl Debug for DelegateAction
Source§impl<'de> Deserialize<'de> for DelegateAction
impl<'de> Deserialize<'de> for DelegateAction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DelegateAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DelegateAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&DelegateAction> for DelegateAction
impl From<&DelegateAction> for DelegateAction
Source§fn from(value: &DelegateAction) -> DelegateAction
fn from(value: &DelegateAction) -> DelegateAction
Converts to this type from the input type.
Source§impl Serialize for DelegateAction
impl Serialize for DelegateAction
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DelegateAction
impl RefUnwindSafe for DelegateAction
impl Send for DelegateAction
impl Sync for DelegateAction
impl Unpin for DelegateAction
impl UnwindSafe for DelegateAction
Blanket Implementations§
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
Mutably borrows from an owned value. Read more