1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Fireblocks API
//
// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech
use {
crate::models,
serde::{Deserialize, Serialize},
};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WriteCallFunctionDto {
/// The vault account id this contract was deploy from
#[serde(rename = "vaultAccountId")]
pub vault_account_id: String,
#[serde(rename = "abiFunction")]
pub abi_function: models::WriteCallFunctionDtoAbiFunction,
/// Amount in base asset. Being used in payable functions
#[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
pub amount: Option<String>,
/// Fee level for the write function transaction. interchangeable with the
/// 'fee' field
#[serde(rename = "feeLevel", skip_serializing_if = "Option::is_none")]
pub fee_level: Option<FeeLevel>,
/// Max fee amount for the write function transaction. interchangeable with
/// the 'feeLevel' field
#[serde(rename = "fee", skip_serializing_if = "Option::is_none")]
pub fee: Option<String>,
/// Custom note, not sent to the blockchain, that describes the transaction
/// at your Fireblocks workspace
#[serde(rename = "note", skip_serializing_if = "Option::is_none")]
pub note: Option<String>,
/// Indicates whether the token should be created in a gasless manner,
/// utilizing the ERC-2771 standard. When set to true, the transaction will
/// be relayed by a designated relayer. The workspace must be configured to
/// use Fireblocks gasless relay.
#[serde(rename = "useGasless", skip_serializing_if = "Option::is_none")]
pub use_gasless: Option<bool>,
/// External id that can be used to identify the transaction in your system.
/// The unique identifier of the transaction outside of Fireblocks with max
/// length of 255 characters
#[serde(rename = "externalId", skip_serializing_if = "Option::is_none")]
pub external_id: Option<String>,
}
impl WriteCallFunctionDto {
pub fn new(
vault_account_id: String,
abi_function: models::WriteCallFunctionDtoAbiFunction,
) -> WriteCallFunctionDto {
WriteCallFunctionDto {
vault_account_id,
abi_function,
amount: None,
fee_level: None,
fee: None,
note: None,
use_gasless: None,
external_id: None,
}
}
}
/// Fee level for the write function transaction. interchangeable with the 'fee'
/// field
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FeeLevel {
#[serde(rename = "LOW")]
Low,
#[serde(rename = "MEDIUM")]
Medium,
#[serde(rename = "HIGH")]
High,
}
impl Default for FeeLevel {
fn default() -> FeeLevel {
Self::Low
}
}