Giter Site home page Giter Site logo

Comments (9)

ntduan avatar ntduan commented on June 21, 2024

can you try this ?

curl --location --request POST 'http://127.0.0.1:9933' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": 19,
    "jsonrpc": "2.0",
    "method": "evm_call",
    "params": [
        {
            "from": "0x75e480db528101a381ce68544611c169ad7eb342",
            "to": "0x851def71f0e6a903375c1e536bd9ff1684bad802",
            "gasLimit": null,
            "storageLimit": null,
            "value": null,
            "data": "0xcfae3217"
        }
    ]
}'

from bodhi.js.

gluneau avatar gluneau commented on June 21, 2024

9933 is not a port that is open. I'm running the docker with the rpc.

PORT     STATE SERVICE
631/tcp  open  ipp
3000/tcp open  ppp
3001/tcp open  nessus
5432/tcp open  postgresql
9944/tcp open  unknown

from bodhi.js.

ntduan avatar ntduan commented on June 21, 2024

9933 is not a port that is open. I'm running the docker with the rpc.

PORT     STATE SERVICE
631/tcp  open  ipp
3000/tcp open  ppp
3001/tcp open  nessus
5432/tcp open  postgresql
9944/tcp open  unknown

http://livepersoninc.github.io/ws-test-page/

image

you can test it with websocket here.

from bodhi.js.

gluneau avatar gluneau commented on June 21, 2024

Like so:

image

from bodhi.js.

ntduan avatar ntduan commented on June 21, 2024

Like so:

image

So this may not be a bug with bodhi.js. @xlc @zjb0807

from bodhi.js.

ntduan avatar ntduan commented on June 21, 2024

Maybe your contract didn't deploy successfully?

from bodhi.js.

zjb0807 avatar zjb0807 commented on June 21, 2024

How can I reproduce the error?

from bodhi.js.

zjb0807 avatar zjb0807 commented on June 21, 2024

If you start node with -levm=debug, you can show me the logs.

from bodhi.js.

gluneau avatar gluneau commented on June 21, 2024

I found the error, I was not using the smart contract address to interact, I was using the returned transaction hash.

➜  hardhat npx hardhat console --network development
Welcome to Node.js v14.18.1.
Type ".help" for more information.
> 
> const Greeter = await ethers.getContractFactory("Greeter");
undefined
> const greeter = await Greeter.attach('0x3d3593927228553b349767aba68d4fb1514678cb');
undefined
> await greeter.greet()
'Hello, Hardhat!'
>

And this is the successful response from the RPC:

[1637286036230] DEBUG (2628826 on XPS-15-7590): incoming request
    jsonrpc: "2.0"
    method: "eth_call"
    params: [
      {
        "from": "0x75e480db528101a381ce68544611c169ad7eb342",
        "to": "0x3d3593927228553b349767aba68d4fb1514678cb",
        "data": "0xcfae3217"
      },
      "latest"
    ]
    id: 5
[1637286036234] DEBUG (2628826 on XPS-15-7590): request completed
    id: 5
    jsonrpc: "2.0"
    result: "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000f48656c6c6f2c2048617264686174210000000000000000000000000000000000"

from bodhi.js.

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.