aurora-is-near / aurora-relayer

[DEPRECATED] Web3-compatible relayer server for Aurora.
https://aurora-is-near.github.io/aurora-relayer/
Creative Commons Zero v1.0 Universal
26 stars 13 forks source link

eth_call: handle negative cases #344

Closed pustovalov closed 2 years ago

pustovalov commented 2 years ago
{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
        {
            "data": "0xbb29998e000000000000000000000000f53cc0ef22a093436bb53478b6b3fa8922264a70",
            "to": "0x4d0FcE38D795155b1A72e55423d3696d4aDff53b"
        },
        "latest"
    ],
    "id": 2
}

Before

{
    "jsonrpc": "2.0",
    "id": 2,
    "error": {
        "code": -32603,
        "message": "Internal Error - The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object. Please report a bug at <https://github.com/aurora-is-near/aurora-relayer/issues>",
        "data": {
            "host": "r003.westcoast.us.testnet.internal.aurora.dev",
            "cf-ray": "760c5f2920f3749d-LHR",
            "request_body": {
                "jsonrpc": "2.0",
                "method": "eth_call",
                "params": [
                    {
                        "data": "0xbb29998e000000000000000000000000f53cc0ef22a093436bb53478b6b3fa8922264a70",
                        "to": "0x4d0FcE38D795155b1A72e55423d3696d4aDff53b"
                    },
                    "latest"
                ],
                "id": 2
            }
        }
    }
}

After

{
    "jsonrpc": "2.0",
    "id": 2,
    "error": {
        "code": -32000,
        "message": "Out Of Offset",
        "data": {
            "host": "localhost:8545",
            "request_body": {
                "jsonrpc": "2.0",
                "method": "eth_call",
                "params": [
                    {
                        "data": "0xbb29998e000000000000000000000000f53cc0ef22a093436bb53478b6b3fa8922264a70",
                        "to": "0x4d0FcE38D795155b1A72e55423d3696d4aDff53b"
                    },
                    "latest"
                ],
                "id": 2
            }
        }
    }
}