AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
138 stars 84 forks source link

Getting "Upgrade Required" message when calling websocket methods #664

Closed sebastianmontero closed 9 months ago

sebastianmontero commented 9 months ago

I've tried calling the dev_newBlock and dev_setHead websocket methods, but I get an upgrade required method. This are the commands I'm using:

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "dev_newBlock", "params":[{"count":"1"}]}' http://localhost:8000

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "dev_setHead", "params":["8976000"]}' http://localhost:8000

Why might this be?

ermalkaleci commented 9 months ago

you're doing http. you can call rpc method using polkadot.js/ api.rpc('dev_newBlock', { count: 1 })