I'd like to get transaction info like sender and receiver address etc. by sending transaction hash as a parameter.
I did found "api.rpc.eth.getTransactionByHash" and tried to pass the hash but it was giving me "TypeError: api.rpc.eth.getTransactionByHash is not a function"
error.
Here is my code:
const dotAddress = async () => {
const wsProvider = new WsProvider("wss://rpc.polkadot.io");
const api = await ApiPromise.create({ provider: wsProvider });
const result = api.rpc.eth.getTransactionByHash(
"0x334cdf788cd4449139ce7dc83bf448b5ef2addb88bf6b642ac43880137e75387"
);
console.log(result);
};
Any help appreciated, thank you!
rpc_methods
and in the runtime metadata. Polkadot is not an ETH-compatible chain, it doesn't have the Frontier pallet. Theeth.*
namespace will only be available on chains with Frontier.