Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

fix: r & s should be quantity in transaction when `eth_getTransaction… #560

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

classicalliu
Copy link
Contributor

…ByHash`

Related Issues:

r and s in transaction when call eth_getTransactionByHash / eth_getBlockByNumber(num, true) / eth_getBlockByHash(hash, true) should regard as quantity type.

For example:

{
    "jsonrpc": "2.0",
    "id": 2,
    "result": {
        "blockHash": "0xc88634c7958b9ef61eedd675680ccc9ceff74c97d05696f5565e15be78bb3e1e",
        "blockNumber": "0xf16d75",
        "from": "0x18228ef922a5999a124035160728d68658732995",
        "gas": "0xce53",
        "gasPrice": "0x55ae82600",
        "hash": "0x129851fcb7f03b1e006ae5935f671d927d97617dcefb182a53d775ea61be4ab5",
        "input": "0xa9059cbb000000000000000000000000145a67769bad2fdae1ed2b5dc8c1b6a76f4d9ff2000000000000000000000000000000000000000000000001611fd470a8cca000",
        "nonce": "0x1670",
        "r": "0xbca226c0ffd4ce56d06b6eb4022e11a294e78529fd4f5d29b707df4d566e7ba",
        "s": "0x4926704a019f312d9d765a095eee58e868d855b815b659c00f524be815d288f0",
        "to": "0x1bbf25e71ec48b84d773809b4ba55b6f4be946fb",
        "transactionIndex": "0xf",
        "type": "0x0",
        "v": "0x1c",
        "value": "0x0"
    }
}

It's a transaction in ethereum mainnet, the r of transaction's length without 0x prefix is 63, not 64

@Flouse Flouse requested review from a team and RetricSu October 25, 2022 15:49
@RetricSu RetricSu merged commit 780fda7 into 1.8-rc Oct 27, 2022
@RetricSu RetricSu deleted the fix-tx-r-s-quantity branch October 27, 2022 02:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zero-padding hex quantity causes hardhat to freak out
3 participants