pub enum PromiseAction {
CreateAccount,
DeployContract {
code: Vec<u8>,
},
FunctionCall {
function_name: String,
arguments: Vec<u8>,
amount: U128,
gas: U64,
},
Transfer {
amount: U128,
},
Stake {
amount: U128,
public_key: String,
},
AddFullAccessKey {
public_key: String,
nonce: Option<U64>,
},
AddAccessKey {
public_key: String,
allowance: U128,
receiver_id: AccountId,
function_names: Vec<String>,
nonce: Option<U64>,
},
DeleteKey {
public_key: String,
},
DeleteAccount {
beneficiary_id: AccountId,
},
}
Expand description
Every native NEAR action can be mapped to a Promise action. NOTE: The native ADD_KEY action is split into two: one for adding a full-access key, one for a function call access key.
Variants§
CreateAccount
Native CREATE_ACCOUNT action
DeployContract
Native DEPLOY_CONTRACT action
FunctionCall
Fields
Native FUNCTION_CALL action
Transfer
Native TRANSFER action
Stake
Native STAKE action
AddFullAccessKey
Fields
Native ADD_KEY action for full-access keys
AddAccessKey
Fields
Native ADD_KEY action for function call keys
DeleteKey
Native DELETE_KEY action
DeleteAccount
Native DELETE_ACCOUNT action
Trait Implementations§
source§impl BorshDeserialize for PromiseActionwhere
Vec<u8>: BorshDeserialize,
String: BorshDeserialize,
U128: BorshDeserialize,
U64: BorshDeserialize,
Option<U64>: BorshDeserialize,
AccountId: BorshDeserialize,
Vec<String>: BorshDeserialize,
impl BorshDeserialize for PromiseActionwhere
Vec<u8>: BorshDeserialize,
String: BorshDeserialize,
U128: BorshDeserialize,
U64: BorshDeserialize,
Option<U64>: BorshDeserialize,
AccountId: BorshDeserialize,
Vec<String>: BorshDeserialize,
source§impl BorshSerialize for PromiseActionwhere
Vec<u8>: BorshSerialize,
String: BorshSerialize,
U128: BorshSerialize,
U64: BorshSerialize,
Option<U64>: BorshSerialize,
AccountId: BorshSerialize,
Vec<String>: BorshSerialize,
impl BorshSerialize for PromiseActionwhere
Vec<u8>: BorshSerialize,
String: BorshSerialize,
U128: BorshSerialize,
U64: BorshSerialize,
Option<U64>: BorshSerialize,
AccountId: BorshSerialize,
Vec<String>: BorshSerialize,
source§impl Clone for PromiseAction
impl Clone for PromiseAction
source§fn clone(&self) -> PromiseAction
fn clone(&self) -> PromiseAction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PromiseAction
impl Debug for PromiseAction
source§impl<'de> Deserialize<'de> for PromiseAction
impl<'de> Deserialize<'de> for PromiseAction
source§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