0

我们如何使用区块链在前端显示交易哈希?我试过了

  1. getTransactionsByAccount("*")
  2. 查找往返eth.accounts[0]地址的交易
  3. https://web3js.readthedocs.io/en/v1.2.11/web3-eth-contract.html
4

1 回答 1

0

在浏览器的控制台上,您可以使用此方法 getTransactionReceipt(tx.result)

const transaction =  web3.eth.getTransactionReceipt(tx.result);           console.log(transaction);

输出

于 2022-02-04T09:12:32.427 回答