python 如何从web3.eth.getTransaction()中获取BNB/ETH的数量

ct3nt3jp  于 2022-12-28  发布在  Python
关注(0)|答案(1)|浏览(231)

如何使用www.example.com从tx获得BNB/ETH的量web3.py
参见屏幕截图enter image description here
谢谢
我正在尝试使用web3.eth.getTransaction(),但没有关于BNB/ETH的值或数量的结果

1l5u6lss

1l5u6lss1#

传输的ETH值在getTransactionByHash()调用的value字段中。使用的气体在gasgasPrice字段中。

Object - Transaction Response Object , or null if no transaction is found:

    hash - The hash of the transaction

    nonce - The number of transactions made by the sender prior to this one encoded as hexadecimal.

    blockHash - The hash of the block where this transaction was in. null if pending.

    blockNumber - The block number where this transaction was in. null if pending.

    transactionIndex - Integer of the transactions index position in the block. null if pending.

    from - Address of the sender.

    to - Address of the receiver. Null when its a contract creation transaction.

    value - The value transferred in Wei, encoded as a hexadecimal.

    gasPrice - The gas price provided by the sender in Wei, encoded as a hexadecimal.

    gas - The gas provided by the sender, encoded as a hexadecimal.

    input - The data sent along with the transaction.

    v - The standardized V field of the signature.

    standardV - The standardized V field of the signature (0 or 1).

    r The R field of the signature.

    raw - The raw transaction data.

    publicKey - The public key of the signer.

    chainId - The chain id of the transaction, if any.

https://www.quicknode.com/docs/ethereum/eth_getTransactionByHash

相关问题