Build with CoinStats’ all-in-one API. Learn more

Deutsch한국어日本語中文EspañolFrançaisՀայերենNederlandsРусскийItalianoPortuguêsTürkçePortfolio TrackerCryptocurrenciesPricingCrypto APIMCPIntegrationsNewsRWA MarketEarnBlogNFTWidgetsDeFi Portfolio TrackerDerivativesETF FlowsCrypto GamingPrediction Markets24h ReportPress KitAPI Docs

Need help with JSON-RPC

bullish:

0

bearish:

0

Share

I failed to use JSON-RPC to get the balance of 2 addresses in a query. Can anyone help?

$ curl localhost:8545 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"eth_call", "params":[{"to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "data": "0x70a0823100000000000000000000000056325cc1d04957681e7d12485e2a9ba2a5935df5"}, {"to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "data": "0x70a08231000000000000000000000000ccdbd8b74fdadaf298519b3776fa000f8baf2718"}, "latest"], "id":1}' {"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"invalid argument 2: json: cannot unmarshal string into Go value of type ethapi.StateOverride"}} 
submitted by /u/notooth1
[link] [comments]
bullish:

0

bearish:

0

Share
Manage all your crypto, NFT and DeFi from one place

Securely connect the portfolio you’re using to start.

Where will Ethereum trade next?

Live Polymarket and Kalshi odds on Ethereum price targets, compared side by side.

See Ethereum price odds