Sha256: 681395be341822748ebfe6074c3c8574ed0945ef6ee88b798123b7250e032b2c

Contents?: true

Size: 827 Bytes

Versions: 9

Compression:

Stored size: 827 Bytes

Contents

module Glueby
  module Contract
    class Timestamp
      module TxBuilder
        class UpdatingTrackable < Trackable
          def set_prev_timestamp_info(timestamp_utxo:, payment_base:, prefix:, data:)
            @prev_timestamp_utxo = timestamp_utxo
            @prev_payment_base = payment_base
            @prev_prefix = prefix
            @prev_data = data
            @txb.add_utxo(to_tapyrusrb_utxo_hash(@prev_timestamp_utxo))
          end

          def sign_tx
            tx = super
            # Generates signature for the remain p2c input.
            @wallet.internal_wallet.sign_to_pay_to_contract_address(
              tx,
              @prev_timestamp_utxo,
              @prev_payment_base,
              [@prev_prefix, @prev_data].join
            )
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
glueby-1.1.2 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-1.1.1 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-1.1.0 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-1.0.0 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-0.12.0 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-0.11.0 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-0.10.2 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-0.10.1 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb
glueby-0.10.0 lib/glueby/contract/timestamp/tx_builder/updating_trackable.rb