Skip to content

Commit

Permalink
value_wei added
Browse files Browse the repository at this point in the history
  • Loading branch information
astudnev committed Feb 1, 2018
1 parent adca4e7 commit 07c2116
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/web3/eth/call_trace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ def initialize trace_data

end

def value_wei
from_hex action['value']
end

def value_eth
wei_to_ether from_hex action['value']
end
Expand Down
4 changes: 4 additions & 0 deletions lib/web3/eth/transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def block_number
from_hex blockNumber
end

def value_wei
from_hex value
end

def value_eth
wei_to_ether from_hex value
end
Expand Down
2 changes: 1 addition & 1 deletion lib/web3/eth/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Web3
module Eth
VERSION = "0.2.5"
VERSION = "0.2.6"
end
end

0 comments on commit 07c2116

Please sign in to comment.