Class: TezosClient::TransactionsOperation

Inherits:
Operation
  • Object
show all
Defined in:
lib/tezos_client/operations/transactions_operation.rb

Instance Method Summary collapse

Methods inherited from Operation

#initialize

Constructor Details

This class inherits a constructor from TezosClient::Operation

Instance Method Details

#operationsObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/tezos_client/operations/transactions_operation.rb', line 14

def operations
  @args[:amounts].map do |destination, amount|
    {
      kind: :transaction,
      amount: amount,
      to: destination
    }.merge(
      @args.slice(
        :gas_limit,
        :storage_limit,
        :fee
      )
    )
  end
end

#rpc_operation_argsObject



5
6
7
8
9
10
11
12
# File 'lib/tezos_client/operations/transactions_operation.rb', line 5

def rpc_operation_args
  @rpc_operation_args ||= OperationArray.new(
      operations: operations,
      secret_key: @args.fetch(:secret_key),
      from: @args.fetch(:from),
      rpc_interface: rpc_interface
    ).rpc_operation_args
end