[Ethereum Shadowing] Unit Mismatch: Tinybars vs Wei Interpretation on Hedera Network #1006
se7enarianelabs
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
We've identified an issue related to unit mismatches between Hedera's tinybars and Ethereum's wei, which is affecting transaction values and leading to unintended behavior.
Issue Details
msg.value = 10^18
expecting it to match Ethereum’s behavior, it is instead interpreted as10^8 tinybars
(1 hbar) on Hedera.Example to Illustrate the Issue
Smart Contract Used:
Link to contract on HashScan
Contract Code:
Transaction Sent:
Transaction on HashScan
Transaction Value Sent:
10^18
(through Hedera JSON RPC API)Result Observed:
a
:10^8
tinybars instead of10^18
.Reproduction Steps
Execute an
eth_call
withtransaction value = 10^18
for the following method in the contract:Verify the saved value in the “a” field by using:
10^18
10^8
Additional Notes
We cannot modify the raw transaction's value field directly, as it would lead to signature mismatches.
Beta Was this translation helpful? Give feedback.
All reactions