Exception: TezosClient::TezBalanceTooLow
- Inherits:
-
OperationFailure
- Object
- StandardError
- OperationFailure
- TezosClient::TezBalanceTooLow
- Defined in:
- lib/tezos_client/exceptions.rb
Constant Summary collapse
- FIRST_ERROR_REGEXP =
/proto\.[^.]*\.contract\.balance_too_low/
Constants included from Logger
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
-
#contract ⇒ Object
readonly
Returns the value of attribute contract.
Attributes inherited from OperationFailure
#errors, #message, #metadata, #status
Instance Method Summary collapse
-
#initialize(metadata:, errors:, status:) ⇒ TezBalanceTooLow
constructor
A new instance of TezBalanceTooLow.
Methods included from Logger
#log, #tezos_contents_log, #tezos_contents_log_filter
Constructor Details
#initialize(metadata:, errors:, status:) ⇒ TezBalanceTooLow
Returns a new instance of TezBalanceTooLow.
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/tezos_client/exceptions.rb', line 78 def initialize(metadata:, errors:, status:) error = errors[0] @contract = error[:contract] @balance = error[:balance] @amount = error[:amount] @message = "Tezos balance too low for address #{contract} (balance: #{balance}, amount #{amount})" super end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
76 77 78 |
# File 'lib/tezos_client/exceptions.rb', line 76 def amount @amount end |
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
75 76 77 |
# File 'lib/tezos_client/exceptions.rb', line 75 def balance @balance end |
#contract ⇒ Object (readonly)
Returns the value of attribute contract.
74 75 76 |
# File 'lib/tezos_client/exceptions.rb', line 74 def contract @contract end |