Module: Eth
- Defined in:
- lib/eth/open_ssl.rb,
lib/eth.rb,
lib/eth/tx.rb,
lib/eth/key.rb,
lib/eth/sedes.rb,
lib/eth/utils.rb,
lib/eth/version.rb
Overview
Defined Under Namespace
Modules: Sedes, Utils
Classes: Configuration, Key, OpenSsl, Tx
Constant Summary
collapse
- REPLAYABLE_CHAIN_ID =
13
- UnsignedTx =
Tx.exclude([:v, :r, :s])
- VERSION =
"0.3.3"
Class Method Summary
collapse
Class Method Details
.chain_id ⇒ Object
21
22
23
|
# File 'lib/eth.rb', line 21
def chain_id
(configuration.chain_id || REPLAYABLE_CHAIN_ID).to_i
end
|
17
18
19
|
# File 'lib/eth.rb', line 17
def configure
yield(configuration)
end
|
.prevent_replays? ⇒ Boolean
33
34
35
|
# File 'lib/eth.rb', line 33
def prevent_replays?
chain_id != REPLAYABLE_CHAIN_ID
end
|
.replayable_v?(v) ⇒ Boolean
37
38
39
|
# File 'lib/eth.rb', line 37
def replayable_v?(v)
[replayable_v_base, replayable_v_base + 1].include? v
end
|
.replayable_v_base ⇒ Object
29
30
31
|
# File 'lib/eth.rb', line 29
def replayable_v_base
(REPLAYABLE_CHAIN_ID * 2) + 1
end
|
.v_base ⇒ Object
25
26
27
|
# File 'lib/eth.rb', line 25
def v_base
(chain_id * 2) + 1
end
|