harmony icon indicating copy to clipboard operation
harmony copied to clipboard

`From` address reported by `hmyv2_` and `eth_` is different

Open MaxMustermann2 opened this issue 2 years ago • 0 comments

Reported by a Discord user, and probably linked to chainId since the from address of a transaction is calculated on the fly using it as an input.

from pyhmy import transaction, util
from web3 import Web3
tx_hash = '0xffa92de7c8ec1ff53d796daaf9912198617616e3bf0f85c7f10665892ea18688'
endpoint = 'https://api.harmony.one'
# uses hmyv2_getTransactionByHash internally
hmy_result = util.convert_one_to_hex( transaction.get_transaction_by_hash( tx_hash, endpoint )[ 'from' ] )
web3 = Web3( Web3.HTTPProvider( endpoint ) )
# uses eth_getTransactionByHash
eth_result = web3.eth.get_transaction( tx_hash )[ 'from' ]
print( hmy_result )
print( eth_result )
0x423E101673c796Cbeb78AA28E703478D79291Afe
0xFD51d9C108b654208789D441c57CbA5e1866dc0d

Will be replicated on localnet and fixed once the current priority work is resolved.

MaxMustermann2 avatar Jul 15 '22 11:07 MaxMustermann2