Skip to content

Commit

Permalink
refactor: updated RPC to op sepolia in testing post request
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashk767 committed Apr 22, 2024
1 parent dd0d6b2 commit 2948ff2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func getAPIByteArray(index int) []byte {

func TestGetDataFromAPI(t *testing.T) {
//postRequestInput := `{"type": "POST","url": "https://rpc.ankr.com/polygon_mumbai","body": {"jsonrpc": "2.0","method": "eth_chainId","params": [],"id": 0},"header": {"content-type": "application/json"}}`
sampleChainId, _ := hex.DecodeString("7b226a736f6e727063223a22322e30222c226964223a302c22726573756c74223a2230783133383831227d")
sampleChainId, _ := hex.DecodeString("7b226a736f6e727063223a22322e30222c22726573756c74223a223078616133376463222c226964223a307d0a")

type args struct {
urlStruct types.DataSourceURL
Expand Down Expand Up @@ -108,7 +108,7 @@ func TestGetDataFromAPI(t *testing.T) {
args: args{
urlStruct: types.DataSourceURL{
Type: "POST",
URL: "https://rpc.ankr.com/polygon_mumbai",
URL: "https://sepolia.optimism.io",
Body: map[string]interface{}{"jsonrpc": "2.0", "method": "eth_chainId", "params": nil, "id": 0},
Header: map[string]string{"content-type": "application/json"},
},
Expand All @@ -120,7 +120,7 @@ func TestGetDataFromAPI(t *testing.T) {
args: args{
urlStruct: types.DataSourceURL{
Type: "POST",
URL: "https://rpc.ankr.com/polygon_mumbai",
URL: "https://sepolia.optimism.io",
Body: map[string]interface{}{"jsonrpc": "2.0", "method": "eth_chainId", "params": nil, "id": 0},
Header: map[string]string{"auth": "${API_KEY}", "content-type": "application/json"},
},
Expand Down

0 comments on commit 2948ff2

Please sign in to comment.