Class: Minter::MultiSendTx
- Inherits:
-
Transaction
- Object
- Transaction
- Minter::MultiSendTx
- Defined in:
- lib/minter/transactions/multi_send_tx.rb
Instance Attribute Summary collapse
-
#chain_id ⇒ Object
Returns the value of attribute chain_id.
-
#coin ⇒ Object
Returns the value of attribute coin.
-
#gas_coin ⇒ Object
Returns the value of attribute gas_coin.
-
#gas_price ⇒ Object
Returns the value of attribute gas_price.
-
#items ⇒ Object
Returns the value of attribute items.
-
#nonce ⇒ Object
Returns the value of attribute nonce.
Instance Method Summary collapse
- #add_item(coin_id:, value:, address_to:) ⇒ Object
-
#initialize(nonce:, chain_id:, gas_coin:, gas_price:) ⇒ MultiSendTx
constructor
A new instance of MultiSendTx.
- #to_params ⇒ Object
Methods inherited from Transaction
Constructor Details
#initialize(nonce:, chain_id:, gas_coin:, gas_price:) ⇒ MultiSendTx
Returns a new instance of MultiSendTx.
7 8 9 10 11 12 13 |
# File 'lib/minter/transactions/multi_send_tx.rb', line 7 def initialize(nonce:, chain_id:, gas_coin:, gas_price:) @nonce = nonce @chain_id = chain_id @gas_coin = gas_coin @gas_price = gas_price @items = [] end |
Instance Attribute Details
#chain_id ⇒ Object
Returns the value of attribute chain_id.
5 6 7 |
# File 'lib/minter/transactions/multi_send_tx.rb', line 5 def chain_id @chain_id end |
#coin ⇒ Object
Returns the value of attribute coin.
5 6 7 |
# File 'lib/minter/transactions/multi_send_tx.rb', line 5 def coin @coin end |
#gas_coin ⇒ Object
Returns the value of attribute gas_coin.
5 6 7 |
# File 'lib/minter/transactions/multi_send_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/multi_send_tx.rb', line 5 def gas_price @gas_price end |
#items ⇒ Object
Returns the value of attribute items.
5 6 7 |
# File 'lib/minter/transactions/multi_send_tx.rb', line 5 def items @items end |
#nonce ⇒ Object
Returns the value of attribute nonce.
5 6 7 |
# File 'lib/minter/transactions/multi_send_tx.rb', line 5 def nonce @nonce end |
Instance Method Details
#add_item(coin_id:, value:, address_to:) ⇒ Object
15 16 17 |
# File 'lib/minter/transactions/multi_send_tx.rb', line 15 def add_item(coin_id:, value:, address_to:) @items << { CoinID: coin_id, Value: value, AddressTo: address_to } end |
#to_params ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/minter/transactions/multi_send_tx.rb', line 19 def to_params { Nonce: nonce, ChainId: chain_id, GasCoin: gas_coin, GasPrice: gas_price, Items: items } end |