module MoacEth

originally lifted from github.com/lian/bitcoin-ruby thanks to everyone there for figuring this out

Constants

BYTE_ZERO
UINT_MAX
UnsignedTx
VERSION

Public Class Methods

chain_id() click to toggle source
# File lib/moac_eth.rb, line 28
def chain_id
  configuration.chain_id
end
configure() { |configuration| ... } click to toggle source
# File lib/moac_eth.rb, line 20
def configure
  yield(configuration)
end
prevent_replays?() click to toggle source
# File lib/moac_eth.rb, line 40
def prevent_replays?
  !chain_id.nil?
end
replayable_chain_id() click to toggle source
# File lib/moac_eth.rb, line 24
def replayable_chain_id
  27
end
replayable_v?(v) click to toggle source
# File lib/moac_eth.rb, line 44
def replayable_v?(v)
  [replayable_chain_id, replayable_chain_id + 1].include? v
end
tx_data_hex?() click to toggle source
# File lib/moac_eth.rb, line 48
def tx_data_hex?
  !!configuration.tx_data_hex
end
v_base() click to toggle source
# File lib/moac_eth.rb, line 32
def v_base
  if chain_id
    (chain_id * 2) + 35
  else
    replayable_chain_id
  end
end

Private Class Methods

configuration() click to toggle source
# File lib/moac_eth.rb, line 55
def configuration
  @configuration ||= Configuration.new
end