pub struct FunctionCallPermission {
pub allowance: Option<String>,
pub method_names: Vec<String>,
pub receiver_id: 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.
JSON schema
{
"description": "Grants limited permission to make transactions with FunctionCallActions\nThe permission can limit the allowed balance to be spent on the prepaid gas.\nIt also restrict the account ID of the receiver for this function call.\nIt also can restrict the method name for the allowed function calls.",
"type": "object",
"required": [
"method_names",
"receiver_id"
],
"properties": {
"allowance": {
"description": "Allowance is a balance limit to use by this access key to pay for function call gas and\ntransaction fees. When this access key is used, both account balance and the allowance is\ndecreased by the same value.\n`None` means unlimited allowance.\nNOTE: To change or increase the allowance, the old access key needs to be deleted and a new\naccess key should be created.",
"type": [
"string",
"null"
]
},
"method_names": {
"description": "A list of method names that can be used. The access key only allows transactions with the\nfunction call of one of the given method names.\nEmpty list means any method name can be used.",
"type": "array",
"items": {
"type": "string"
}
},
"receiver_id": {
"description": "The access key only allows transactions with the given receiver's account id.",
"type": "string"
}
}
}
Fields§
§allowance: Option<String>
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.
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.
receiver_id: String
The access key only allows transactions with the given receiver’s account id.
Trait Implementations§
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 more