Sha256: bc5121855432a042060a69d98c51a779ad446fcfe9f662ce3cef03d61e2f5d31

Contents?: true

Size: 682 Bytes

Versions: 4

Compression:

Stored size: 682 Bytes

Contents

module Glueby
  module Contract
    module Task
      module Timestamp
        module_function
        extend Glueby::Contract::TxBuilder

        def create
          timestamps = Glueby::Contract::AR::Timestamp.where(status: :init)
          fee_estimator = Glueby::Contract::FixedFeeEstimator.new
          timestamps.each { |t| t.save_with_broadcast(fee_estimator: fee_estimator) }
        end
      end
    end
  end
end

namespace :glueby do
  namespace :contract do
    namespace :timestamp do
      desc 'create and broadcast glueby timestamp tx'
      task :create, [] => [:environment] do |_, _|
        Glueby::Contract::Task::Timestamp.create
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
glueby-0.11.0 lib/tasks/glueby/contract/timestamp.rake
glueby-0.10.2 lib/tasks/glueby/contract/timestamp.rake
glueby-0.10.1 lib/tasks/glueby/contract/timestamp.rake
glueby-0.10.0 lib/tasks/glueby/contract/timestamp.rake