Closed kj4ezj closed 1 year ago
Verify the RPC API rejects unencrypted requests: I believe currently unencrypted requests will be 301 to https instead of 500
The current behavior is to respond to unencrypted requests with a 500
.
$ curl -fsSL http://api.testnet.evm.eosnetwork.com/v3 -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | jq .
curl: (22) The requested URL returned error: 500
also, where does the v3 in https://api.testnet.evm.eosnetwork.com/v3 come from?
This comes from ChatGPT. I asked for an API call that MetaMask makes to an RPC API. It gave me the following:
curl -fsSL http://api.testnet.evm.eosnetwork.com/v3 -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | jq .
I added jq
. The expected response is as follows:
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x472736"
}
From evm-public-docs issue 3, this pull request documents the smoke tests being used to manually determine if network endpoints are suitable to make available to the public.
See Also