pub struct TokenFee {
pub amount: TokenFeeAmount,
pub token: TokenFeeToken,
}
Expand description
TokenFee
JSON schema
{
"type": "object",
"required": [
"amount",
"token"
],
"properties": {
"amount": {
"description": "The estimated amount of the fee in atomic units of the `token`. For example, `1000000000000000` if the fee is in ETH equates to 0.001 ETH, `10000` if the fee is in USDC equates to 0.01 USDC, etc.",
"examples": [
"1000000000000000000"
],
"type": "string",
"pattern": "^\\d+$"
},
"token": {
"description": "The contract address of the token that the fee is paid in. The address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` is used for the native token of the network (e.g. ETH).",
"examples": [
"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
],
"type": "string",
"pattern": "^0x[a-fA-F0-9]{40}$"
}
}
}
Fields§
§amount: TokenFeeAmount
The estimated amount of the fee in atomic units of the token
. For example, 1000000000000000
if the fee is in ETH equates to 0.001 ETH, 10000
if the fee is in USDC equates to 0.01 USDC, etc.
token: TokenFeeToken
The contract address of the token that the fee is paid in. The address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
is used for the native token of the network (e.g. ETH).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TokenFee
impl<'de> Deserialize<'de> for TokenFee
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
Auto Trait Implementations§
impl Freeze for TokenFee
impl RefUnwindSafe for TokenFee
impl Send for TokenFee
impl Sync for TokenFee
impl Unpin for TokenFee
impl UnwindSafe for TokenFee
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