Class: TezosClient::OperationArray

Inherits:
RawOperationArray show all
Defined in:
lib/tezos_client/operations/operation_array.rb

Instance Method Summary collapse

Methods inherited from RawOperationArray

#rpc_operation_args

Methods inherited from Operation

#initialize

Constructor Details

This class inherits a constructor from TezosClient::Operation

Instance Method Details

#post_initialize(operations:, **args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/tezos_client/operations/operation_array.rb', line 5

def post_initialize(operations:, **args)
  @raw_operations = operations.map do |operation|
    operation_kind = operation.delete(:kind)
    operation_klass(operation_kind).new(
      operation.merge(
        from: @args.fetch(:from),
        rpc_interface: rpc_interface,
        counter: 0 # will be set by raw_operation_array
      )
    ).rpc_operation_args
  end
end