Class: Privy::Models::Gas
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Privy::Models::Gas
- Defined in:
- lib/privy/models/gas.rb
Instance Attribute Summary collapse
-
#amount ⇒ String
Gas cost in the gas token as a human-readable decimal string (e.g. “0.0001”).
-
#base_amount ⇒ String
Gas cost in the gas token’s base units (e.g. wei).
-
#gas_asset ⇒ String
Gas token symbol (e.g. “ETH”, “USDC”).
Instance Method Summary collapse
-
#initialize(amount:, base_amount:, gas_asset:) ⇒ Object
constructor
Gas cost for a blockchain action.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(amount:, base_amount:, gas_asset:) ⇒ Object
Gas cost for a blockchain action. Includes both raw base-unit amount and a human-readable decimal string, plus the gas token symbol.
|
|
# File 'lib/privy/models/gas.rb', line 24
|
Instance Attribute Details
#amount ⇒ String
Gas cost in the gas token as a human-readable decimal string (e.g. “0.0001”).
10 |
# File 'lib/privy/models/gas.rb', line 10 required :amount, String |
#base_amount ⇒ String
Gas cost in the gas token’s base units (e.g. wei).
16 |
# File 'lib/privy/models/gas.rb', line 16 required :base_amount, String |
#gas_asset ⇒ String
Gas token symbol (e.g. “ETH”, “USDC”).
22 |
# File 'lib/privy/models/gas.rb', line 22 required :gas_asset, String |