Git Product home page Git Product logo

Comments (2)

vanya2h avatar vanya2h commented on June 2, 2024

Also I need to mention the format of response itself. Here's example of call to Ethereum Goerli

window.rainbow.sendAsync({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_estimateGas",
    "params": [
        {
            "from": "0x76c5855e93bd498b6331652854c4549d34bc3a30",
            "data": "0x22a775b6000000000000000000000000000000000000000000000000000000000000004000000000000000000000000076c5855e93bd498b6331652854c4549d34bc3a3076c5855e93bd498b6331652854c4549d34bc3a3000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000000412f697066732f6261666b726569677a616573766e35326e62726c7a7334337964676c32626c7a65777a3233636533706a706c376b62627968686c326d757635696900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000076c5855e93bd498b6331652854c4549d34bc3a300000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000100000000000000000000000076c5855e93bd498b6331652854c4549d34bc3a3000000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000",
            "to": "0x1723017329a804564bc8d215496c89eabf1f3211"
        }
    ]
})

I see two problems in the response:

  1. The response doesn't follow standard json rpc response with such fields as jsonrpc, result, id and have just the raw value as it was sent via request API and not sendAsync
  2. The response is not hexademical number and instead just a decimal number which is not working with some libraries that depends on estimateGas call
  3. On some calls (e.g. eth_getBalance) returns unknown structure such as { "type": "BigNumber", "hex": "0x410ec70450f539bf" } and it seems very far away from the standards

from browser-extension.

DanielSinclair avatar DanielSinclair commented on June 2, 2024

@vanya2h Thanks for reporting this! This was fixed and released a few weeks back with additions to our window provider described here: rainbow-me/provider#9

from browser-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.