Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ endpoints:
network-address:
address: "127.0.0.1:2220"
node-urls:
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_7
internal-path: /ws/rpc/v0_7
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_10
internal-path: /ws/rpc/v0_10
Addons:
- trace
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_6
internal-path: /ws/rpc/v0_6
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_9
internal-path: /ws/rpc/v0_9
Addons:
- trace
- url: wss://starknet-mainnet.domain.com/ws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ endpoints:
network-address:
address: "127.0.0.1:2220"
node-urls:
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_7
internal-path: /ws/rpc/v0_7
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_6
internal-path: /ws/rpc/v0_6
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_10
internal-path: /ws/rpc/v0_10
- url: wss://starknet-mainnet.domain.com/ws/rpc/v0_9
internal-path: /ws/rpc/v0_9
- url: wss://starknet-mainnet.domain.com/ws
- url: https://starknet-mainnet.domain.com
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# An example fo configuring manually each internal path
# To support trace addon, simply add:
# To support trace addon, simply add:
# addons:
# - trace
# - trace
# to each url group.
endpoints:
- api-interface: jsonrpc
Expand All @@ -10,16 +10,14 @@ endpoints:
address: "127.0.0.1:2220"
node-urls:
- url: <wss url here>/ws
internal-path: "/ws"
- url: <wss url here>/ws/rpc/v0_6
internal-path: "/ws/rpc/v0_6"
- url: <wss url here>/ws/rpc/v0_7
internal-path: "/ws/rpc/v0_7"
internal-path: ""
- url: <wss url here>/ws/rpc/v0_9
internal-path: "/ws/rpc/v0_9"
- url: <wss url here>/ws/rpc/v0_10
internal-path: "/ws/rpc/v0_10"
- url: <https url here>
internal-path: ""
- url: <https url here>/rpc/v0_5
internal-path: "/rpc/v0_5"
- url: <https url here>/rpc/v0_6
internal-path: "/rpc/v0_6"
- url: <https url here>/rpc/v0_7
internal-path: "/rpc/v0_7"
- url: <https url here>/rpc/v0_9
internal-path: "/rpc/v0_9"
- url: <https url here>/rpc/v0_10
internal-path: "/rpc/v0_10"
4 changes: 2 additions & 2 deletions config/provider_examples/strk_addon_example_with_ws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ endpoints:
address: "127.0.0.1:2220"
node-urls:
- url: wss://starknet.api.onfinality.io/public-ws
internal-path: /ws/rpc/v0_9
internal-path: /ws/rpc/v0_10
- url: wss://starknet.api.onfinality.io/public-ws
internal-path: /ws/rpc/v0_8
internal-path: /ws/rpc/v0_9
- url: wss://starknet.api.onfinality.io/public-ws
- url: https://starknet-mainnet.public.blastapi.io
20 changes: 9 additions & 11 deletions config/provider_examples/strk_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ endpoints:
address: "127.0.0.1:2220"
node-urls:
- url: <wss url here>/ws
internal-path: "/ws"
- url: <wss url here>/ws/rpc/v0_6
internal-path: "/ws/rpc/v0_6"
- url: <wss url here>/ws/rpc/v0_7
internal-path: "/ws/rpc/v0_7"
internal-path: ""
- url: <wss url here>/ws/rpc/v0_9
internal-path: "/ws/rpc/v0_9"
- url: <wss url here>/ws/rpc/v0_10
internal-path: "/ws/rpc/v0_10"
- url: <https url here>
internal-path: ""
- url: <https url here>/rpc/v0_5
internal-path: "/rpc/v0_5"
- url: <https url here>/rpc/v0_6
internal-path: "/rpc/v0_6"
- url: <https url here>/rpc/v0_7
internal-path: "/rpc/v0_7"
- url: <https url here>/rpc/v0_9
internal-path: "/rpc/v0_9"
- url: <https url here>/rpc/v0_10
internal-path: "/rpc/v0_10"
10 changes: 5 additions & 5 deletions protocol/chainlib/jsonRPC_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ func TestJsonRpcInternalPathsMultipleVersionsStarkNet(t *testing.T) {
require.NotNil(t, chainParser)
require.NotNil(t, chainProxy)
require.NotNil(t, chainFetcher)
v8_path := "/rpc/v0_8"
v9_path := "/rpc/v0_9"
v10_path := "/rpc/v0_10"
req_data := []byte(`{"jsonrpc": "2.0", "id": 1, "method": "starknet_specVersion", "params": []}`)
chainMessage, err := chainParser.ParseMsg("", req_data, http.MethodPost, nil, extensionslib.ExtensionInfo{LatestBlock: 0})
require.NoError(t, err)
Expand All @@ -493,19 +493,19 @@ func TestJsonRpcInternalPathsMultipleVersionsStarkNet(t *testing.T) {
require.Equal(t, "starknet_specVersion", api.Name)
require.Equal(t, "", collection.CollectionData.InternalPath)

chainMessage, err = chainParser.ParseMsg(v8_path, req_data, http.MethodPost, nil, extensionslib.ExtensionInfo{LatestBlock: 0})
chainMessage, err = chainParser.ParseMsg(v9_path, req_data, http.MethodPost, nil, extensionslib.ExtensionInfo{LatestBlock: 0})
require.NoError(t, err)
api = chainMessage.GetApi()
collection = chainMessage.GetApiCollection()
require.Equal(t, "starknet_specVersion", api.Name)
require.Equal(t, v8_path, collection.CollectionData.InternalPath)
require.Equal(t, v9_path, collection.CollectionData.InternalPath)

chainMessage, err = chainParser.ParseMsg(v9_path, req_data, http.MethodPost, nil, extensionslib.ExtensionInfo{LatestBlock: 0})
chainMessage, err = chainParser.ParseMsg(v10_path, req_data, http.MethodPost, nil, extensionslib.ExtensionInfo{LatestBlock: 0})
require.NoError(t, err)
api = chainMessage.GetApi()
collection = chainMessage.GetApiCollection()
require.Equal(t, "starknet_specVersion", api.Name)
require.Equal(t, v9_path, collection.CollectionData.InternalPath)
require.Equal(t, v10_path, collection.CollectionData.InternalPath)
}

func TestJsonRpcInternalPathsMultipleVersionsAvalanche(t *testing.T) {
Expand Down
Loading
Loading