Class: Minter::BuyCoinTx
- Inherits:
-
Transaction
- Object
- Transaction
- Minter::BuyCoinTx
- Defined in:
- lib/minter/transactions/buy_coin_tx.rb
Instance Attribute Summary collapse
-
#chain_id ⇒ Object
Returns the value of attribute chain_id.
-
#coin_to_buy ⇒ Object
Returns the value of attribute coin_to_buy.
-
#coin_to_sell ⇒ Object
Returns the value of attribute coin_to_sell.
-
#gas_coin ⇒ Object
Returns the value of attribute gas_coin.
-
#gas_price ⇒ Object
Returns the value of attribute gas_price.
-
#maximum_value_to_sell ⇒ Object
Returns the value of attribute maximum_value_to_sell.
-
#nonce ⇒ Object
Returns the value of attribute nonce.
-
#value_to_buy ⇒ Object
Returns the value of attribute value_to_buy.
Instance Method Summary collapse
-
#initialize(coin_to_buy:, value_to_buy:, coin_to_sell:, maximum_value_to_sell:, nonce:, chain_id:, gas_coin:, gas_price:) ⇒ BuyCoinTx
constructor
rubocop:disable Metrics/ParameterLists.
- #to_params ⇒ Object
Methods inherited from Transaction
Constructor Details
#initialize(coin_to_buy:, value_to_buy:, coin_to_sell:, maximum_value_to_sell:, nonce:, chain_id:, gas_coin:, gas_price:) ⇒ BuyCoinTx
rubocop:disable Metrics/ParameterLists
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 7 def initialize(coin_to_buy:, value_to_buy:, coin_to_sell:, maximum_value_to_sell:, nonce:, chain_id:, gas_coin:, gas_price:) # rubocop:disable Metrics/ParameterLists @coin_to_buy = coin_to_buy @value_to_buy = value_to_buy @coin_to_sell = coin_to_sell @maximum_value_to_sell = maximum_value_to_sell @nonce = nonce @chain_id = chain_id @gas_coin = gas_coin @gas_price = gas_price end |
Instance Attribute Details
#chain_id ⇒ Object
Returns the value of attribute chain_id.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def chain_id @chain_id end |
#coin_to_buy ⇒ Object
Returns the value of attribute coin_to_buy.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def coin_to_buy @coin_to_buy end |
#coin_to_sell ⇒ Object
Returns the value of attribute coin_to_sell.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def coin_to_sell @coin_to_sell end |
#gas_coin ⇒ Object
Returns the value of attribute gas_coin.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def gas_coin @gas_coin end |
#gas_price ⇒ Object
Returns the value of attribute gas_price.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def gas_price @gas_price end |
#maximum_value_to_sell ⇒ Object
Returns the value of attribute maximum_value_to_sell.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def maximum_value_to_sell @maximum_value_to_sell end |
#nonce ⇒ Object
Returns the value of attribute nonce.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def nonce @nonce end |
#value_to_buy ⇒ Object
Returns the value of attribute value_to_buy.
5 6 7 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 5 def value_to_buy @value_to_buy end |
Instance Method Details
#to_params ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/minter/transactions/buy_coin_tx.rb', line 18 def to_params { CoinToBuy: coin_to_buy, ValueToBuy: value_to_buy, CoinToSell: coin_to_sell, MaximumValueToSell: maximum_value_to_sell, Nonce: nonce, ChainId: chain_id, GasCoin: gas_coin, GasPrice: gas_price } end |