Sha256: 733d73f2b5dbad9b7291ce597cea66a9d1f2a8a38f831c6f068eb87bea5b0937

Contents?: true

Size: 821 Bytes

Versions: 15

Compression:

Stored size: 821 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift( File.expand_path("../../lib", __FILE__) )
require 'mastercoin-ruby'
require 'thor'

module Mastercoin
  module Cli
    class ExodusPayment < Thor
      class_option :storage, required: true

      desc "from_transaction <tx_hash>", "Calculates coins bought via Exodus payment"
      def from_transaction(hash) 
        puts "Looking up tx with hash #{hash}"
        Mastercoin.set_storage(options[:storage])
        puts Mastercoin::ExodusPayment.from_transaction(hash)
      end

      desc "from_address <bitcoin_address>", "Calculates total amount of mastercoins bought"
      def from_address(address)
        Mastercoin.set_storage(options[:storage])
        puts Mastercoin::ExodusPayment.from_address(address)
      end
    end
  end
end

Mastercoin::Cli::ExodusPayment.start(ARGV)

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mastercoin-ruby-0.2.9 bin/exodus_payment
mastercoin-ruby-0.2.8 bin/exodus_payment
mastercoin-ruby-0.2.7 bin/exodus_payment
mastercoin-ruby-0.2.6 bin/exodus_payment
mastercoin-ruby-0.2.5 bin/exodus_payment
mastercoin-ruby-0.2.4 bin/exodus_payment
mastercoin-ruby-0.2.3 bin/exodus_payment
mastercoin-ruby-0.2.2 bin/exodus_payment
mastercoin-ruby-0.2.1 bin/exodus_payment
mastercoin-ruby-0.2.0 bin/exodus_payment
mastercoin-ruby-0.1.0 bin/exodus_payment
mastercoin-ruby-0.0.5 bin/exodus_payment
mastercoin-ruby-0.0.4 bin/exodus_payment
mastercoin-ruby-0.0.3 bin/exodus_payment
mastercoin-ruby-0.0.2 bin/exodus_payment