pub struct Gas {
pub amount: String,
pub base_amount: String,
pub gas_asset: String,
}Expand description
Gas cost for a blockchain action. Includes both raw base-unit amount and a human-readable decimal string, plus the gas token symbol.
JSON schema
{
"title": "Gas",
"description": "Gas cost for a blockchain action. Includes both raw
base-unit amount and a human-readable decimal string, plus the gas token
symbol.",
"examples": [
{
"amount": "0.0001",
"base_amount": "100000000000000",
"gas_asset": "ETH"
}
],
"type": "object",
"required": [
"amount",
"base_amount",
"gas_asset"
],
"properties": {
"amount": {
"description": "Gas cost in the gas token as a human-readable
decimal string (e.g. \"0.0001\").",
"type": "string"
},
"base_amount": {
"description": "Gas cost in the gas token's base units (e.g.
wei).",
"type": "string"
},
"gas_asset": {
"description": "Gas token symbol (e.g. \"ETH\", \"USDC\").",
"type": "string"
}
},
"x-stainless-model": "wallets.gas"
}Fields§
§amount: StringGas cost in the gas token as a human-readable decimal string (e.g. “0.0001”).
base_amount: StringGas cost in the gas token’s base units (e.g. wei).
gas_asset: StringGas token symbol (e.g. “ETH”, “USDC”).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Gas
impl<'de> Deserialize<'de> for Gas
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 Gas
impl RefUnwindSafe for Gas
impl Send for Gas
impl Sync for Gas
impl Unpin for Gas
impl UnsafeUnpin for Gas
impl UnwindSafe for Gas
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