pub struct EvmDataCriterion {
pub abi: EvmDataCriterionAbi,
pub conditions: Vec<EvmDataCondition>,
pub type_: EvmDataCriterionType,
}
Expand description
A schema for specifying a criterion for the data
field of an EVM transaction.
JSON schema
{
"title": "EvmDataCriterion",
"description": "A schema for specifying a criterion for the `data` field of an EVM transaction.",
"type": "object",
"required": [
"abi",
"conditions",
"type"
],
"properties": {
"abi": {
"description": "The ABI of the smart contract being called. This can be a partial structure with only specific functions.",
"examples": [
"erc20"
],
"oneOf": [
{
"$ref": "#/components/schemas/KnownAbiType"
},
{
"$ref": "#/components/schemas/Abi"
}
]
},
"conditions": {
"description": "A list of conditions to apply against the function and encoded arguments in the transaction's `data` field. Each condition must be met in order for this policy to be accepted or rejected.",
"examples": [
[
{
"function": "approve"
},
{
"function": "transfer",
"params": [
{
"name": "value",
"operator": "<=",
"value": "10000"
},
{
"name": "to",
"operator": "in",
"values": [
"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
]
}
]
}
]
],
"type": "array",
"items": {
"$ref": "#/components/schemas/EvmDataCondition"
}
},
"type": {
"description": "The type of criterion to use. This should be `evmData`.",
"examples": [
"evmData"
],
"type": "string",
"enum": [
"evmData"
]
}
},
"x-audience": "public"
}
Fields§
§abi: EvmDataCriterionAbi
The ABI of the smart contract being called. This can be a partial structure with only specific functions.
conditions: Vec<EvmDataCondition>
A list of conditions to apply against the function and encoded arguments in the transaction’s data
field. Each condition must be met in order for this policy to be accepted or rejected.
type_: EvmDataCriterionType
The type of criterion to use. This should be evmData
.
Implementations§
Source§impl EvmDataCriterion
impl EvmDataCriterion
pub fn builder() -> EvmDataCriterion
Trait Implementations§
Source§impl Clone for EvmDataCriterion
impl Clone for EvmDataCriterion
Source§fn clone(&self) -> EvmDataCriterion
fn clone(&self) -> EvmDataCriterion
Returns a duplicate 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 EvmDataCriterion
impl Debug for EvmDataCriterion
Source§impl<'de> Deserialize<'de> for EvmDataCriterion
impl<'de> Deserialize<'de> for EvmDataCriterion
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
Source§impl From<&EvmDataCriterion> for EvmDataCriterion
impl From<&EvmDataCriterion> for EvmDataCriterion
Source§fn from(value: &EvmDataCriterion) -> Self
fn from(value: &EvmDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<EvmDataCriterion> for EvmDataCriterion
impl From<EvmDataCriterion> for EvmDataCriterion
Source§fn from(value: EvmDataCriterion) -> Self
fn from(value: EvmDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<EvmDataCriterion> for PrepareUserOperationCriteriaItem
impl From<EvmDataCriterion> for PrepareUserOperationCriteriaItem
Source§fn from(value: EvmDataCriterion) -> Self
fn from(value: EvmDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<EvmDataCriterion> for SendEvmTransactionCriteriaItem
impl From<EvmDataCriterion> for SendEvmTransactionCriteriaItem
Source§fn from(value: EvmDataCriterion) -> Self
fn from(value: EvmDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<EvmDataCriterion> for SendUserOperationCriteriaItem
impl From<EvmDataCriterion> for SendUserOperationCriteriaItem
Source§fn from(value: EvmDataCriterion) -> Self
fn from(value: EvmDataCriterion) -> Self
Converts to this type from the input type.
Source§impl From<EvmDataCriterion> for SignEvmTransactionCriteriaItem
impl From<EvmDataCriterion> for SignEvmTransactionCriteriaItem
Source§fn from(value: EvmDataCriterion) -> Self
fn from(value: EvmDataCriterion) -> Self
Converts to this type from the input type.
Source§impl Serialize for EvmDataCriterion
impl Serialize for EvmDataCriterion
Source§impl TryFrom<EvmDataCriterion> for EvmDataCriterion
impl TryFrom<EvmDataCriterion> for EvmDataCriterion
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: EvmDataCriterion) -> Result<Self, ConversionError>
fn try_from(value: EvmDataCriterion) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for EvmDataCriterion
impl RefUnwindSafe for EvmDataCriterion
impl Send for EvmDataCriterion
impl Sync for EvmDataCriterion
impl Unpin for EvmDataCriterion
impl UnwindSafe for EvmDataCriterion
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