How to know the cryptocurrency used in a transaction through the transaction hash?
I'm using the following code:
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
...
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
}
var transaction = web3.eth.getTransaction('0x42ca92e05d21592e92e36c93ae6e31d0583c4c95cadd42901e297b55c6b465af');
console.log(transaction);
And I'm getting the object below:
Promise
[[Prototype]]: Promise
[[PromiseState]]: "fulfilled"
[[PromiseResult]]: Object
blockHash: "0x91a5799cac3de01498a4988d4e55bb29f6b56617490bf854ce5e1f21821db2e2"
blockNumber: 14832362
from: "0xdE4429D4cD2afa9C4314254F1cb074181f0e184e"
gas: 200000
gasPrice: "10000000000"
hash: "0x42ca92e05d21592e92e36c93ae6e31d0583c4c95cadd42901e297b55c6b465af"
input: "0x"
nonce: 12
r: "0xec1cb9f6b134c375542c4aaff07aa6ae8bd831918e52a609e77f227683524f67"
s: "0x798123f2eb75584430c2016cf91eeb384306291dcbc50eae64fc73c140cc972d"
to: "0x69AF47261C4585C365e4E1D93b635974a30fb117"
transactionIndex: 7
type: 0
v: "0x94"
value: "10000000000000000"
[[Prototype]]: Object
I find the value, the recipient, and the origin but I can't figure out where is any information about the uses token. I would be glad if someone helps me.