diff --git a/simulators/ethereum/graphql/Dockerfile b/simulators/ethereum/graphql/Dockerfile index 9b378708ce..b062b2c4cb 100644 --- a/simulators/ethereum/graphql/Dockerfile +++ b/simulators/ethereum/graphql/Dockerfile @@ -2,6 +2,9 @@ FROM golang:1-alpine as builder RUN apk add --update git gcc musl-dev linux-headers +# Clone the tests repo. +RUN git clone --depth 1 https://github.com/ethereum/execution-apis.git /execution-apis + # Build the simulator executable. ADD . /source WORKDIR /source @@ -12,4 +15,5 @@ FROM alpine:latest ADD . /source WORKDIR /source COPY --from=builder /source/graphql . +COPY --from=builder /execution-apis/tests/graphql ./tests ENTRYPOINT ["./graphql"] diff --git a/simulators/ethereum/graphql/go.mod b/simulators/ethereum/graphql/go.mod index 68b2773a8f..cde7717d8c 100644 --- a/simulators/ethereum/graphql/go.mod +++ b/simulators/ethereum/graphql/go.mod @@ -2,7 +2,10 @@ module github.com/ethereum/hive/simulators/ethereum/graphql go 1.18 -require github.com/ethereum/hive v0.0.0-20230919110229-d58aec4a3eb5 +require ( + github.com/ethereum/hive v0.0.0-20230919110229-d58aec4a3eb5 + github.com/yudai/gojsondiff v1.0.0 +) require ( github.com/Microsoft/go-winio v0.6.1 // indirect @@ -15,10 +18,13 @@ require ( github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/holiman/uint256 v1.2.3 // indirect + github.com/sergi/go-diff v1.3.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect + github.com/yudai/pp v2.0.1+incompatible // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect golang.org/x/crypto v0.12.0 // indirect golang.org/x/exp v0.0.0-20230810033253-352e893a4cad // indirect diff --git a/simulators/ethereum/graphql/go.sum b/simulators/ethereum/graphql/go.sum index 385d52e663..d640d76332 100644 --- a/simulators/ethereum/graphql/go.sum +++ b/simulators/ethereum/graphql/go.sum @@ -51,6 +51,9 @@ github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -69,9 +72,12 @@ github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= @@ -81,6 +87,12 @@ github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFA github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= @@ -153,6 +165,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inconshreveable/log15.v2 v2.0.0-20200109203555-b30bc20e4fd1 h1:iiHuQZCNgYPmFQxd3BBN/Nc5+dAwzZuq5y40s20oQw0= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= diff --git a/simulators/ethereum/graphql/graphql.go b/simulators/ethereum/graphql/graphql.go index 0ef3a6aca9..12574f9518 100644 --- a/simulators/ethereum/graphql/graphql.go +++ b/simulators/ethereum/graphql/graphql.go @@ -3,18 +3,21 @@ package main import ( "bytes" "encoding/json" + "errors" "fmt" "io" "net/http" "os" - "path" "path/filepath" - "reflect" + "regexp" "strconv" "strings" "sync" + "time" "github.com/ethereum/hive/hivesim" + diff "github.com/yudai/gojsondiff" + "github.com/yudai/gojsondiff/formatter" ) func main() { @@ -50,8 +53,8 @@ the client launched by this test.`, "HIVE_SHANGHAI_TIMESTAMP": "1444660030", }, Files: map[string]string{ - "/genesis.json": "./init/testGenesis.json", - "/chain.rlp": "./init/testBlockchain.blocks", + "/genesis.json": "./tests/genesis.json", + "/chain.rlp": "./tests/chain.rlp", }, Run: graphqlTest, }) @@ -68,18 +71,25 @@ func graphqlTest(t *hivesim.T, c *hivesim.Client) { } } + _, testPattern := t.Sim.TestPattern() + re := regexp.MustCompile(testPattern) + var wg sync.WaitGroup - testCh := deliverTests(t, &wg, -1) + testCh := deliverTests(t, "tests", &wg, re) for i := 0; i < parallelism; i++ { wg.Add(1) - go func() { + func() { defer wg.Done() for test := range testCh { - url := "https://github.com/ethereum/hive/blob/master/simulators/ethereum/graphql/testcases" + url := "https://github.com/ethereum/execution-apis/blob/main/tests/graphql" t.Run(hivesim.TestSpec{ - Name: fmt.Sprintf("%s (%s)", test.name, c.Type), - Description: fmt.Sprintf("Test case source: %s/%v.json", url, test.name), - Run: func(t *hivesim.T) { test.run(t, c) }, + Name: fmt.Sprintf("%s (%s)", test.Name, c.Type), + Description: fmt.Sprintf("Test case source: %s/%v.io", url, test.Name), + Run: func(t *hivesim.T) { + if err := runTest(t, c, test.Data); err != nil { + t.Fatalf("failed in test: %s, error: %v\n", test.Name, err) + } + }, }) } }() @@ -87,133 +97,195 @@ func graphqlTest(t *hivesim.T, c *hivesim.Client) { wg.Wait() } +type test struct { + Name string + Data []byte +} + // deliverTests reads the test case files, sending them to the output channel. -func deliverTests(t *hivesim.T, wg *sync.WaitGroup, limit int) <-chan *testCase { - out := make(chan *testCase) - var i = 0 +func deliverTests(t *hivesim.T, root string, wg *sync.WaitGroup, re *regexp.Regexp) <-chan *test { + out := make(chan *test) wg.Add(1) go func() { defer wg.Done() - filepath.Walk("./testcases", func(filepath string, info os.FileInfo, err error) error { - if limit >= 0 && i >= limit { - return nil + + filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + if err != nil { + t.Logf("unable to walk path: %s", err) + return err } if info.IsDir() { return nil } - if fname := info.Name(); !strings.HasSuffix(fname, ".json") { + if fname := info.Name(); !strings.HasSuffix(fname, ".io") { return nil } - data, err := os.ReadFile(filepath) - if err != nil { - t.Logf("Warning: can't read test file %s: %v", filepath, err) - return nil - } - var gqlTest graphQLTest - if err = json.Unmarshal(data, &gqlTest); err != nil { - t.Logf("Warning: can't unmarshal test file %s: %v", filepath, err) - return nil + pathname := strings.TrimSuffix(strings.TrimPrefix(path, root), ".io") + if !re.MatchString(pathname) { + t.Log("skip", pathname) + return nil // skip } - i = i + 1 - t := testCase{ - name: strings.TrimSuffix(info.Name(), path.Ext(info.Name())), - gqlTest: &gqlTest, + data, err := os.ReadFile(path) + if err != nil { + return err } - out <- &t + name := strings.TrimLeft(strings.TrimLeft(pathname, root), "/") + out <- &test{Name: name, Data: data} return nil }) + close(out) }() return out } -type testCase struct { - name string - gqlTest *graphQLTest +type qlQuery struct { + Query string `json:"query"` } -// graphQLTest is the JSON object structure of a test case file. -type graphQLTest struct { - Request string `json:"request"` - Responses []interface{} `json:"responses"` - StatusCode int `json:"statusCode"` +type qlResponse struct { + Errors *[]interface{} `json:"errors,omitempty"` + Data *interface{} `json:"data,omitempty"` } -type qlQuery struct { - Query string `json:"query"` +func runTest(t *hivesim.T, c *hivesim.Client, data []byte) error { + var ( + client = &http.Client{ + Timeout: 5 * time.Second, + Transport: &loggingRoundTrip{ + t: t, + inner: http.DefaultTransport, + }, + } + url = fmt.Sprintf("http://%s:8545/graphql", c.IP.String()) + err error + code int + resp []byte + ) + + for _, line := range strings.Split(string(data), "\n") { + line = strings.TrimSpace(line) + switch { + case len(line) == 0 || strings.HasPrefix(line, "//"): + // Skip comments, blank lines. + continue + case strings.HasPrefix(line, ">> "): + // Send request. + code, resp, err = sendHTTP(client, url, line[3:]) + if err != nil { + return err + } + case strings.HasPrefix(line, "<< "): + // Read response. Unmarshal to interface{} to verify deep equality. Marshal + // again to remove padding differences and to print each field in the same + // order. This makes it easy to spot any discrepancies. + if resp == nil { + return errors.New("invalid test, response before request") + } + + var have qlResponse + if err := json.Unmarshal(resp, &have); err != nil { + t.Fatal("can't decode response:", err) + } + + // Check error with StatusCode only + if have.Errors != nil { + if code != 400 { + return fmt.Errorf("invalid test stateCode, want 400, have %d", code) + } + } else { + if code != 200 { + return fmt.Errorf("invalid test stateCode, want 200, have %d", code) + } + want := []byte(strings.TrimSpace(line)[3:]) // trim leading "<< " + + // Now compare the response body. + d, err := diff.New().Compare(resp, want) + if err != nil { + return fmt.Errorf("failed to unmarshal value: %s\n", err) + } + // If there is a discrepancy, return error. + if d.Modified() { + var got map[string]interface{} + json.Unmarshal(resp, &got) + config := formatter.AsciiFormatterConfig{ + ShowArrayIndex: true, + Coloring: false, + } + formatter := formatter.NewAsciiFormatter(got, config) + diffString, _ := formatter.Format(d) + return fmt.Errorf("response differs from expected(-/have +/want):\n%s", diffString) + } + } + resp = nil + default: + t.Fatalf("invalid line in test script: %s", line) + } + } + if resp != nil { + t.Fatalf("unhandled response in test case") + } + return nil } -// prepareRunTest administers the hive-specific test stuff, registering the suite and reporting back the suite results -func (tc *testCase) run(t *hivesim.T, c *hivesim.Client) { - // Example of working queries: - // curl 'http://127.0.0.1:8545/graphql' --data-binary '{"query":"query blockNumber {\n block {\n number\n }\n}\n"}' - // curl 'http://127.0.0.1:8545/graphql' --data-binary '{"query":"query blockNumber {\n block {\n number\n }\n}\n","variables":null,"operationName":"blockNumber"}' - postData, err := json.Marshal(qlQuery{Query: tc.gqlTest.Request}) +// sendHttp sends an HTTP GraphQL POST with the provided data and reads the +// response into a byte slice and returns it. +// Example of working queries: +// curl 'http://127.0.0.1:8545/graphql' -H 'Content-Type: application/json' -d '{"query":"query blockNumber {block {number}}"}' +// curl 'http://127.0.0.1:8545/graphql' -H 'Content-Type: application/json' -d '{"query":"query blockNumber {block {number}}","variables":null,"operationName":"blockNumber"}' +func sendHTTP(c *http.Client, url string, query string) (int, []byte, error) { + data, err := json.Marshal(qlQuery{Query: query}) if err != nil { - t.Fatal("can't marshal query:", err) + return 0, nil, err } - url := fmt.Sprintf("http://%v:8545/graphql", c.IP) - resp, err := http.Post(url, "application/json", bytes.NewReader(postData)) + req, err := http.NewRequest("POST", url, bytes.NewReader(data)) if err != nil { - t.Fatal("HTTP post failed:", err) + return 0, nil, fmt.Errorf("error building request: %v", err) } - respBytes, err := io.ReadAll(resp.Body) + req.Header.Set("Content-Type", "application/json") + resp, err := c.Do(req) if err != nil { - t.Fatal("can't read HTTP response:", err) - } - resp.Body.Close() - - if resp.StatusCode != tc.gqlTest.StatusCode { - t.Errorf("HTTP response code is %d, want %d \n response body: %s", resp.StatusCode, tc.gqlTest.StatusCode, string(respBytes)) + return 0, nil, fmt.Errorf("write error: %v", err) } - if resp.StatusCode != 200 { - // Test expects HTTP error, and the client sent one, test done. - // We don't bother to check the exact error messages, those aren't fully specified. - return + body, err := io.ReadAll(resp.Body) + if err != nil { + return 0, nil, fmt.Errorf("read error: %v", err) } - - tc.responseMatch(t, resp.Status, respBytes) + resp.Body.Close() + return resp.StatusCode, body, nil } -func (tc *testCase) responseMatch(t *hivesim.T, respStatus string, respBytes []byte) error { - // Check that the response matches. - var got interface{} - if err := json.Unmarshal(respBytes, &got); err != nil { - t.Fatal("can't decode response:", err) - } - // return if a response matches. If not, error out. - for _, response := range tc.gqlTest.Responses { - if reflect.DeepEqual(response, got) { - return nil - } - } - - prettyQuery, ok := reindentJSON(tc.gqlTest.Request) - prettyResponse, _ := json.MarshalIndent(got, "", " ") +// loggingRoundTrip writes requests and responses to the test log. +type loggingRoundTrip struct { + t *hivesim.T + inner http.RoundTripper +} - t.Log("Test failed.") - t.Log("HTTP response code:", respStatus) - if ok { - t.Log("query:", prettyQuery) +func (rt *loggingRoundTrip) RoundTrip(req *http.Request) (*http.Response, error) { + // Read and log the request body. + reqBytes, err := io.ReadAll(req.Body) + req.Body.Close() + if err != nil { + return nil, err } - t.Log("expected value(s):") + rt.t.Logf(">> %s", bytes.TrimSpace(reqBytes)) + reqCopy := *req + reqCopy.Body = io.NopCloser(bytes.NewReader(reqBytes)) - for _, expected := range tc.gqlTest.Responses { - prettyExpected, _ := json.MarshalIndent(expected, "", " ") - t.Log(string(prettyExpected), "\n_____________________\n") + // Do the round trip. + resp, err := rt.inner.RoundTrip(&reqCopy) + if err != nil { + return nil, err } + defer resp.Body.Close() - t.Log("got:", string(prettyResponse)) - t.Fail() - - return fmt.Errorf("test failed") -} - -func reindentJSON(text string) (string, bool) { - var obj interface{} - if json.Unmarshal([]byte(text), &obj) != nil { - return "", false + // Read and log the response bytes. + respBytes, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err } - indented, _ := json.MarshalIndent(&obj, "", " ") - return string(indented), true + respCopy := *resp + respCopy.Body = io.NopCloser(bytes.NewReader(respBytes)) + rt.t.Logf("<< %s", bytes.TrimSpace(respBytes)) + return &respCopy, nil } diff --git a/simulators/ethereum/graphql/graphql_test.go b/simulators/ethereum/graphql/graphql_test.go deleted file mode 100644 index e1bf3457fb..0000000000 --- a/simulators/ethereum/graphql/graphql_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package main - -import ( - "encoding/json" - "strconv" - "testing" - - "github.com/ethereum/hive/hivesim" -) - -type testResponse struct { - Data gasPrice `json:"data"` -} - -type gasPrice struct { - GasPrice string `json:"gasPrice"` -} - -// Test_responseMatch tests whether the graphql tests are able -// to successfully compare a response to an array of valid expected -// responses. -func Test_responseMatch(t *testing.T) { - // create hivesim tester - hivesimT := &hivesim.T{} - // unmarshal JSON test file - fp := "./testcases/07_eth_gasPrice.json" - data, err := os.ReadFile(fp) - if err != nil { - t.Fatalf("Warning: can't read test file %s: %v", fp, err) - } - var gqlTest graphQLTest - if err = json.Unmarshal(data, &gqlTest); err != nil { - t.Fatalf("Warning: can't unmarshal test file %s: %v", fp, err) - } - // build test case - tc := testCase{ - name: "test1", - gqlTest: &gqlTest, - } - // create valid tests - var tests = []struct { - resp testResponse - status string - expectedFailure bool // true == failure expected - }{ - { - resp: testResponse{ - Data: gasPrice{GasPrice: "0x1"}, - }, - status: "200", - }, - { - resp: testResponse{ - Data: gasPrice{GasPrice: "0x10"}, - }, - status: "200", - }, - { - resp: testResponse{ - Data: gasPrice{GasPrice: "0x12"}, - }, - status: "400", - expectedFailure: true, - }, - { - resp: testResponse{ - Data: gasPrice{GasPrice: "0x11"}, - }, - status: "400", - expectedFailure: true, - }, - { - resp: testResponse{ - Data: gasPrice{GasPrice: "failfailfail"}, - }, - status: "200", - expectedFailure: true, - }, - } - - for i, tt := range tests { - t.Run(strconv.Itoa(i), func(t *testing.T) { - resp, err := json.Marshal(tt.resp) - if err != nil { - t.Fatal("could not marshal data: ", err) - } - err = tc.responseMatch(hivesimT, "200", resp) - if err != nil && !tt.expectedFailure { - t.Fatal(err) - } - }) - } -} diff --git a/simulators/ethereum/graphql/init/testBlockchain.blocks b/simulators/ethereum/graphql/init/testBlockchain.blocks deleted file mode 100755 index 480efc87d9..0000000000 Binary files a/simulators/ethereum/graphql/init/testBlockchain.blocks and /dev/null differ diff --git a/simulators/ethereum/graphql/init/testGenesis.json b/simulators/ethereum/graphql/init/testGenesis.json deleted file mode 100644 index e55ac90082..0000000000 --- a/simulators/ethereum/graphql/init/testGenesis.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "config" : {}, - "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x42", - "gasLimit" : "0x2fefd8", - "mixHash" : "0x2c85bcbce56429100b2108254bb56906257582aeafcbd682bc9af67a9f5aee46", - "nonce" : "0x78cc16f7b4f65485", - "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", - "timestamp" : "0x54c98c81", - "alloc" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance" : "0x09184e72a000" - } - } -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/01_eth_blockNumber.json b/simulators/ethereum/graphql/testcases/01_eth_blockNumber.json deleted file mode 100644 index 8ff5d2aa9e..0000000000 --- a/simulators/ethereum/graphql/testcases/01_eth_blockNumber.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "request": - "{ block { number } }", - - "responses": [{ - "data" : { - "block" : { - "number" : "0x21" - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json b/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json deleted file mode 100644 index fdcac0dee6..0000000000 --- a/simulators/ethereum/graphql/testcases/02_eth_call_Block8.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request": "{block(number :8) {number call (data : {from : \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", to: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\", data :\"0x12a7b914\"}){data status}}}" - , - "responses":[{ - "data" : { - "block" : { - "number" : "0x8", - "call" : { - "data" : "0x0000000000000000000000000000000000000000000000000000000000000000", - "status" : "0x1" - } - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/03_eth_call_BlockLatest.json b/simulators/ethereum/graphql/testcases/03_eth_call_BlockLatest.json deleted file mode 100644 index b3a19b2699..0000000000 --- a/simulators/ethereum/graphql/testcases/03_eth_call_BlockLatest.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "request": "{block {number call (data : {from : \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", to: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\", data :\"0x12a7b914\"}){data status}}}" - , - "responses":[{ - "data" : { - "block" : { - "number" : "0x21", - "call" : { - "data" : "0x0000000000000000000000000000000000000000000000000000000000000001", - "status" : "0x1" - } - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json b/simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json deleted file mode 100644 index e478559af5..0000000000 --- a/simulators/ethereum/graphql/testcases/04_eth_estimateGas_contractDeploy.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "request" :"{block(number: 32) {estimateGas (data: {from :\"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\", data :\"0x608060405234801561001057600080fd5b50610157806100206000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633bdab8bf146100515780639ae97baa14610068575b600080fd5b34801561005d57600080fd5b5061006661007f565b005b34801561007457600080fd5b5061007d6100b9565b005b7fa53887c1eed04528e23301f55ad49a91634ef5021aa83a97d07fd16ed71c039a60016040518082815260200191505060405180910390a1565b7fa53887c1eed04528e23301f55ad49a91634ef5021aa83a97d07fd16ed71c039a60026040518082815260200191505060405180910390a17fa53887c1eed04528e23301f55ad49a91634ef5021aa83a97d07fd16ed71c039a60036040518082815260200191505060405180910390a15600a165627a7a7230582010ddaa52e73a98c06dbcd22b234b97206c1d7ed64a7c048e10c2043a3d2309cb0029\"})}}", - "responses":[{ - "data" : { - "block" : { - "estimateGas" : "0x1b551" - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json b/simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json deleted file mode 100644 index 9eb5656b58..0000000000 --- a/simulators/ethereum/graphql/testcases/05_eth_estimateGas_noParams.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "request" :"{block(number: 32) { estimateGas(data:{}) }}", - "responses":[{ - "data" : { - "block" : { - "estimateGas" : "0x5208" - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/06_eth_estimateGas_transfer.json b/simulators/ethereum/graphql/testcases/06_eth_estimateGas_transfer.json deleted file mode 100644 index c35dbadf46..0000000000 --- a/simulators/ethereum/graphql/testcases/06_eth_estimateGas_transfer.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "request" :"{block{estimateGas (data: {from :\"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\", to :\"0x8888f1f195afa192cfee860698584c030f4c9db1\"})}}", - "responses":[{ - "data" : { - "block" : { - "estimateGas" : "0x5208" - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/07_eth_gasPrice.json b/simulators/ethereum/graphql/testcases/07_eth_gasPrice.json deleted file mode 100644 index e54d5b2800..0000000000 --- a/simulators/ethereum/graphql/testcases/07_eth_gasPrice.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "request": - "{ gasPrice }", - "responses": [ - { - "data" : { - "gasPrice" : "0x10" - } - }, - { - "data" : { - "gasPrice" : "0x1" - } - } - ], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/08_eth_getBalance_0x19.json b/simulators/ethereum/graphql/testcases/08_eth_getBalance_0x19.json deleted file mode 100644 index 6e17cfb97b..0000000000 --- a/simulators/ethereum/graphql/testcases/08_eth_getBalance_0x19.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "request": "{block (number : 25) {account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\") { balance } }}", - "responses": [{ - "data": { - "block": { - "account": { - "balance": "0xfa" - } - } - } - }], - "statusCode": 200 -} - diff --git a/simulators/ethereum/graphql/testcases/09_eth_getBalance_invalidAccountBlockNumber.json b/simulators/ethereum/graphql/testcases/09_eth_getBalance_invalidAccountBlockNumber.json deleted file mode 100644 index e22db98583..0000000000 --- a/simulators/ethereum/graphql/testcases/09_eth_getBalance_invalidAccountBlockNumber.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "request": "{block (number: 25) {account(address: \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\") { balance } }}", - "responses": [{ - "data": { - "block": { - "account": { - "balance": "0x0" - } - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/10_eth_getBalance_invalidAccountLatest.json b/simulators/ethereum/graphql/testcases/10_eth_getBalance_invalidAccountLatest.json deleted file mode 100644 index 885795588e..0000000000 --- a/simulators/ethereum/graphql/testcases/10_eth_getBalance_invalidAccountLatest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "request": "{block{account(address: \"0xdeaff00ddeaff00ddeaff00ddeaff00ddeaff00d\") { balance } }}", - "responses": [{ - "data": { - "block": { - "account": { - "balance": "0x0" - } - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/11_eth_getBalance_latest.json b/simulators/ethereum/graphql/testcases/11_eth_getBalance_latest.json deleted file mode 100644 index 6dfdb27d9a..0000000000 --- a/simulators/ethereum/graphql/testcases/11_eth_getBalance_latest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "request": "{block{account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\") { balance } }}", - "responses":[{ - "data": { - "block": { - "account": { - "balance": "0x140" - } - } - } - }], - "statusCode": 200 -} - diff --git a/simulators/ethereum/graphql/testcases/12_eth_getBalance_toobig_bn.json b/simulators/ethereum/graphql/testcases/12_eth_getBalance_toobig_bn.json deleted file mode 100644 index 39d4c98b00..0000000000 --- a/simulators/ethereum/graphql/testcases/12_eth_getBalance_toobig_bn.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "request": "{block (number: 33) {account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\") { balance } }}", - "responses": [{ - "errors": [ - { - "message": "Exception while fetching data (/account) : Invalid params", - "locations": [ - { - "line": 1, - "column": 2 - } - ], - "path": [ - "account" - ], - "extensions": { - "errorCode": -32602, - "errorMessage": "Invalid params", - "classification": "DataFetchingException" - } - } - ], - "data": null - }, - { - "data": { - "block": null - } - }], - "statusCode": 400 -} - diff --git a/simulators/ethereum/graphql/testcases/13_eth_getBalance_without_addr.json b/simulators/ethereum/graphql/testcases/13_eth_getBalance_without_addr.json deleted file mode 100644 index 54bb700d1c..0000000000 --- a/simulators/ethereum/graphql/testcases/13_eth_getBalance_without_addr.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "request": "{block{account { balance } }}", - "responses": [{ - "errors": [ - { - "message": "Validation error of type MissingFieldArgument: Missing field argument address @ 'account'", - "locations": [ - { - "line": 1, - "column": 2 - } - ], - "extensions": { - "classification": "ValidationError" - } - } - ] - }], - "statusCode": 400 -} - diff --git a/simulators/ethereum/graphql/testcases/14_eth_getBlock_byHash.json b/simulators/ethereum/graphql/testcases/14_eth_getBlock_byHash.json deleted file mode 100644 index decf15c17a..0000000000 --- a/simulators/ethereum/graphql/testcases/14_eth_getBlock_byHash.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "request": - - "{block (hash : \"0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6\") {number transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot}} ", - - - "responses": [{ - "data" : { - "block" : { - "number" : "0x1e", - "transactions" : [ { - "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" - } ], - "timestamp" : "0x561bc336", - "difficulty" : "0x20740", - "totalDifficulty" : "0x3e6cc0", - "gasUsed" : "0x5c21", - "gasLimit" : "0x2fefd8", - "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", - "nonce" : "0x5c321bd9e9f040f1", - "ommerCount" : "0x0", - "logsBloom" : "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000", - "mixHash" : "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c", - "ommerHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "extraData" : "0x", - "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", - "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : "0x1", - "transactionsRoot" : "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01" - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/15_eth_getBlock_byHashInvalid.json b/simulators/ethereum/graphql/testcases/15_eth_getBlock_byHashInvalid.json deleted file mode 100644 index a53a108341..0000000000 --- a/simulators/ethereum/graphql/testcases/15_eth_getBlock_byHashInvalid.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "request": "{block (hash : \"0x123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0\") {number } }", - "responses": [{ - "errors": [ - { - "message": "Exception while fetching data (/block) : Block hash 0x123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0 was not found", - "locations": [ - { - "line": 1, - "column": 2 - } - ], - "path": [ - "block" - ], - "extensions": { - "classification": "DataFetchingException" - } - } - ], - "data": null - }], - "statusCode": 400 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json b/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json deleted file mode 100644 index 34244dbc5c..0000000000 --- a/simulators/ethereum/graphql/testcases/16_eth_getBlock_byNumber.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "request": - - "{block (number : 30) {transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot ommers{hash} ommerAt(index : 1){hash} miner{address} account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\"){balance} parent{hash} }} ", - - - "responses":[{ - "data" : { - "block" : { - "transactions" : [ { - "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" - } ], - "timestamp" : "0x561bc336", - "difficulty" : "0x20740", - "totalDifficulty" : "0x3e6cc0", - "gasUsed" : "0x5c21", - "gasLimit" : "0x2fefd8", - "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", - "nonce" : "0x5c321bd9e9f040f1", - "ommerCount" : "0x0", - "logsBloom" : "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000", - "mixHash" : "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c", - "ommerHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "extraData" : "0x", - "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", - "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : "0x1", - "transactionsRoot" : "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01", - "ommers" : [ ], - "ommerAt" : null, - "miner" : { - "address" : "0x8888f1f195afa192cfee860698584c030f4c9db1" - }, - "account" : { - "balance" : "0x12c" - }, - "parent" : { - "hash" : "0xf8cfa377bd766cdf22edb388dd08cc149e85d24f2796678c835f3c54ab930803" - } - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/17_eth_getBlock_byNumberInvalid.json b/simulators/ethereum/graphql/testcases/17_eth_getBlock_byNumberInvalid.json deleted file mode 100644 index 90eefbaf91..0000000000 --- a/simulators/ethereum/graphql/testcases/17_eth_getBlock_byNumberInvalid.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "request": "{block (number: 88888888) {number }} ", - "responses": [ - { - "errors": [ - { - "message": "Exception while fetching data (/block) : Block number 88888888 was not found", - "locations": [ - { - "line": 1, - "column": 2 - } - ], - "path": [ - "block" - ], - "extensions": { - "classification": "DataFetchingException" - } - } - ], - "data": null - }, - { - "data": { - "block": null - } - } - ], - "statusCode": 400 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/18_eth_getBlock_wrongParams.json b/simulators/ethereum/graphql/testcases/18_eth_getBlock_wrongParams.json deleted file mode 100644 index f2e7f663af..0000000000 --- a/simulators/ethereum/graphql/testcases/18_eth_getBlock_wrongParams.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "request": "{block (number: \"0x03\", hash : \"0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6\") {number transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot}} ", - "responses": [{ - "errors": [ - { - "message": "Exception while fetching data (/block) : Invalid params", - "locations": [ - { - "line": 1, - "column": 2 - } - ], - "path": [ - "block" - ], - "extensions": { - "errorCode": -32602, - "errorMessage": "Invalid params", - "classification": "DataFetchingException" - } - } - ], - "data": null - }], - "statusCode": 400 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/19_eth_getBlockTransactionCount_byHash.json b/simulators/ethereum/graphql/testcases/19_eth_getBlockTransactionCount_byHash.json deleted file mode 100644 index 3a31866f19..0000000000 --- a/simulators/ethereum/graphql/testcases/19_eth_getBlockTransactionCount_byHash.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "request": - - "{block (hash : \"0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6\") {transactionCount}} ", - - - "responses": [{ - "data" : { - "block" : { - "transactionCount" : "0x1" - } - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json b/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json deleted file mode 100644 index 4573355dae..0000000000 --- a/simulators/ethereum/graphql/testcases/20_eth_getBlockTransactionCount_byNumber.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "request": - - "{block (number : 30) {transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot}} ", - - - "responses": [{ - "data" : { - "block" : { - "transactions" : [ { - "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" - } ], - "timestamp" : "0x561bc336", - "difficulty" : "0x20740", - "totalDifficulty" : "0x3e6cc0", - "gasUsed" : "0x5c21", - "gasLimit" : "0x2fefd8", - "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", - "nonce" : "0x5c321bd9e9f040f1", - "ommerCount" : "0x0", - "logsBloom" : "0x00000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000080000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000400000000000000000200000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000000040000000000000000000000000000000000000000010000000000000000000000000", - "mixHash" : "0x6ce1c4afb4f85fefd1b0ed966b20cd248f08d9a5b0df773f75c6c2f5cc237b7c", - "ommerHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "extraData" : "0x", - "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", - "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : "0x1", - "transactionsRoot" : "0x5a8d5d966b48e1331ae19eb459eb28882cdc7654e615d37774b79204e875dc01" - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/21_eth_getCode_noCode.json b/simulators/ethereum/graphql/testcases/21_eth_getCode_noCode.json deleted file mode 100644 index f70d77d1d1..0000000000 --- a/simulators/ethereum/graphql/testcases/21_eth_getCode_noCode.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "request" : "{block{ account(address: \"0x8888f1f195afa192cfee860698584c030f4c9db1\") { code } }}", - - "responses": [{ - "data": { - "block": { - "account": { - "code": "0x" - } - } - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/22_eth_getCode.json b/simulators/ethereum/graphql/testcases/22_eth_getCode.json deleted file mode 100644 index e8babeb9bf..0000000000 --- a/simulators/ethereum/graphql/testcases/22_eth_getCode.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "request" : "{block{ account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\") { code } }}", - - "responses": [{ - "data": { - "block": { - "account": { - "code": "0x6000357c010000000000000000000000000000000000000000000000000000000090048063102accc11461012c57806312a7b9141461013a5780631774e6461461014c5780631e26fd331461015d5780631f9030371461016e578063343a875d1461018057806338cc4831146101955780634e7ad367146101bd57806357cb2fc4146101cb57806365538c73146101e057806368895979146101ee57806376bc21d9146102005780639a19a9531461020e5780639dc2c8f51461021f578063a53b1c1e1461022d578063a67808571461023e578063b61c05031461024c578063c2b12a731461025a578063d2282dc51461026b578063e30081a01461027c578063e8beef5b1461028d578063f38b06001461029b578063f5b53e17146102a9578063fd408767146102bb57005b6101346104d6565b60006000f35b61014261039b565b8060005260206000f35b610157600435610326565b60006000f35b6101686004356102c9565b60006000f35b610176610442565b8060005260206000f35b6101886103d3565b8060ff1660005260206000f35b61019d610413565b8073ffffffffffffffffffffffffffffffffffffffff1660005260206000f35b6101c56104c5565b60006000f35b6101d36103b7565b8060000b60005260206000f35b6101e8610454565b60006000f35b6101f6610401565b8060005260206000f35b61020861051f565b60006000f35b6102196004356102e5565b60006000f35b610227610693565b60006000f35b610238600435610342565b60006000f35b610246610484565b60006000f35b610254610493565b60006000f35b61026560043561038d565b60006000f35b610276600435610350565b60006000f35b61028760043561035e565b60006000f35b6102956105b4565b60006000f35b6102a3610547565b60006000f35b6102b16103ef565b8060005260206000f35b6102c3610600565b60006000f35b80600060006101000a81548160ff021916908302179055505b50565b80600060016101000a81548160ff02191690837f01000000000000000000000000000000000000000000000000000000000000009081020402179055505b50565b80600060026101000a81548160ff021916908302179055505b50565b806001600050819055505b50565b806002600050819055505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b50565b806004600050819055505b50565b6000600060009054906101000a900460ff1690506103b4565b90565b6000600060019054906101000a900460000b90506103d0565b90565b6000600060029054906101000a900460ff1690506103ec565b90565b600060016000505490506103fe565b90565b60006002600050549050610410565b90565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061043f565b90565b60006004600050549050610451565b90565b7f65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be5806000602a81526020016000a15b565b6000602a81526020016000a05b565b60017f81933b308056e7e85668661dcd102b1f22795b4431f9cf4625794f381c271c6b6000602a81526020016000a25b565b60016000602a81526020016000a15b565b3373ffffffffffffffffffffffffffffffffffffffff1660017f0e216b62efbb97e751a2ce09f607048751720397ecfb9eef1e48a6644948985b6000602a81526020016000a35b565b3373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a25b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017f317b31292193c2a4f561cc40a95ea0d97a2733f14af6d6d59522473e1f3ae65f6000602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660016000602a81526020016000a35b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff1660017fd5f0a30e4be0c6be577a71eceb7464245a796a7e6a55c0d971837b250de05f4e60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a45b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001023373ffffffffffffffffffffffffffffffffffffffff16600160007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe98152602001602a81526020016000a35b56" - } - } - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json b/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json deleted file mode 100644 index cf7f6e4b15..0000000000 --- a/simulators/ethereum/graphql/testcases/23_eth_getLogs_matchTopic.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "request": "{ block(number: 23) { logs( filter: { topics : [[\"0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b\", \"0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580\"]]}) { index topics data account{address} transaction{hash} } } }", - "responses": [{ - "data" : { - "block" : { - "logs" : [ { - "index" : "0x0", - "topics" : [ "0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580" ], - "data" : "0x000000000000000000000000000000000000000000000000000000000000002a", - "account" : { - "address" : "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" - }, - "transaction" : { - "hash" : "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6" - } - } ] - } - } - }], - - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/24_eth_getLogs_range.json b/simulators/ethereum/graphql/testcases/24_eth_getLogs_range.json deleted file mode 100644 index 6b04466744..0000000000 --- a/simulators/ethereum/graphql/testcases/24_eth_getLogs_range.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "request": "{ logs( filter: { fromBlock:20, toBlock: 24, topics : [], addresses : []}) { index topics data account{address} transaction{hash block {number}} } }", - "responses": [{ - "data": { - "logs": [ - { - "index": "0x0", - "topics": [ - "0x65c9ac8011e286e89d02a269890f41d67ca2cc597b2c76c7c69321ff492be580" - ], - "data": "0x000000000000000000000000000000000000000000000000000000000000002a", - "account": { - "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" - }, - "transaction": { - "hash": "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6", - "block": { - "number": "0x17" - } - } - }, - { - "index": "0x0", - "topics": [], - "data": "0x000000000000000000000000000000000000000000000000000000000000002a", - "account": { - "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" - }, - "transaction": { - "hash": "0x5ecd942096ab3f70c5bcc8f3a98f88c4ff0a3bd986417df9948eb1819db76d0e", - "block": { - "number": "0x18" - } - } - } - ] - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/25_eth_getStorageAt_illegalRangeGreaterThan.json b/simulators/ethereum/graphql/testcases/25_eth_getStorageAt_illegalRangeGreaterThan.json deleted file mode 100644 index 4995192765..0000000000 --- a/simulators/ethereum/graphql/testcases/25_eth_getStorageAt_illegalRangeGreaterThan.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "request": "{block{ account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\") { storage(slot: \"0x0000000000000000000000000000000000000000000000000000000000000021\") } }}", - "responses": [ - { - "data": { - "block": { - "account": { - "storage": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - } - } - } - ], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/26_eth_getStorageAt.json b/simulators/ethereum/graphql/testcases/26_eth_getStorageAt.json deleted file mode 100644 index 57ae719114..0000000000 --- a/simulators/ethereum/graphql/testcases/26_eth_getStorageAt.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "request": "{block{ account(address: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\") { storage(slot: \"0x0000000000000000000000000000000000000000000000000000000000000004\") } }}", - "responses": [ - { - "data": { - "block": { - "account": { - "storage": "0xaabbccffffffffffffffffffffffffffffffffffffffffffffffffffffffffee" - } - } - } - } - ], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/27_eth_getTransaction_byBlockHashAndIndex.json b/simulators/ethereum/graphql/testcases/27_eth_getTransaction_byBlockHashAndIndex.json deleted file mode 100644 index a445305c3c..0000000000 --- a/simulators/ethereum/graphql/testcases/27_eth_getTransaction_byBlockHashAndIndex.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "request": - - "{ block(hash: \"0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6\") { transactionAt(index: 0) {block{hash} hash } } }", - - "responses":[{ - "data" : { - "block" : { - "transactionAt" : { - "block" : { - "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6" - }, - "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" - } - } - } - }], - - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/28_eth_getTransaction_byBlockNumberAndIndex.json b/simulators/ethereum/graphql/testcases/28_eth_getTransaction_byBlockNumberAndIndex.json deleted file mode 100644 index 00a41f132d..0000000000 --- a/simulators/ethereum/graphql/testcases/28_eth_getTransaction_byBlockNumberAndIndex.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "request": - - "{ block(number: 30) { transactionAt(index: 0) {block{hash} hash} } }", - - "responses":[{ - "data" : { - "block" : { - "transactionAt" : { - "block" : { - "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6" - }, - "hash" : "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4" - } - } - } - }], - - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/29_eth_getTransaction_byBlockNumberAndInvalidIndex.json b/simulators/ethereum/graphql/testcases/29_eth_getTransaction_byBlockNumberAndInvalidIndex.json deleted file mode 100644 index f7dd2b9529..0000000000 --- a/simulators/ethereum/graphql/testcases/29_eth_getTransaction_byBlockNumberAndInvalidIndex.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "request": - - "{ block(number: 30) { transactionAt(index: 1) {block{hash} hash} } }", - - "responses":[{ - "data" : { - "block" : { - "transactionAt" : null - } - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/30_eth_getTransaction_byHash.json b/simulators/ethereum/graphql/testcases/30_eth_getTransaction_byHash.json deleted file mode 100644 index b5607f0fbd..0000000000 --- a/simulators/ethereum/graphql/testcases/30_eth_getTransaction_byHash.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "request": "{transaction (hash : \"0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4\") { block{hash} gas gasPrice hash inputData nonce index value from {address} to {address} logs{index} status createdContract{address} } } ", - "responses": [ - { - "data": { - "transaction": { - "block": { - "hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6" - }, - "gas": "0x4cb2f", - "gasPrice": "0x1", - "hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4", - "inputData": "0xe8beef5b", - "nonce": "0x1d", - "index": "0x0", - "value": "0xa", - "from": { - "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" - }, - "to": { - "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" - }, - "logs": [ - { - "index": "0x0" - } - ], - "status": null, - "createdContract": null - } - } - }, - { - "data": { - "transaction": { - "block": { - "hash": "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6" - }, - "createdContract": null, - "from": { - "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" - }, - "gas": "0x4cb2f", - "gasPrice": "0x1", - "hash": "0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4", - "index": 0, - "inputData": "0xe8beef5b", - "logs": [ - { - "index": 0 - } - ], - "nonce": "0x1d", - "status": "0x0", - "to": { - "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" - }, - "value": "0xa" - } - } - } - ], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/31_eth_getTransaction_byHashNull.json b/simulators/ethereum/graphql/testcases/31_eth_getTransaction_byHashNull.json deleted file mode 100644 index cf238cb74e..0000000000 --- a/simulators/ethereum/graphql/testcases/31_eth_getTransaction_byHashNull.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "request": - - "{transaction (hash : \"0xffc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4\") { block{hash} gas gasPrice hash inputData nonce index value }} ", - - - "responses": [{ - "data" : { - "transaction" : null - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json b/simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json deleted file mode 100644 index 7234ea96b1..0000000000 --- a/simulators/ethereum/graphql/testcases/32_eth_getTransactionCount.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "request": "{block{ account(address: \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\") { transactionCount } }}", - "responses": [{ - "data": { - "block": { - "account": { - "transactionCount": "0x21" - } - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/33_eth_getTransactionReceipt.json b/simulators/ethereum/graphql/testcases/33_eth_getTransactionReceipt.json deleted file mode 100644 index e481c1d7ee..0000000000 --- a/simulators/ethereum/graphql/testcases/33_eth_getTransactionReceipt.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "request": "{ transaction(hash: \"0x812742182a79a8e67733edc58cfa3767aa2d7ad06439d156ddbbb33e3403b4ed\") {block{hash logsBloom} hash createdContract{address} cumulativeGasUsed gas gasUsed logs{topics} from{address} to{address} index } }", - "responses": [ - { - "data": { - "transaction": { - "block": { - "hash": "0x10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - }, - "createdContract": { - "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" - }, - "cumulativeGasUsed": "0x78674", - "from": { - "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" - }, - "gas": "0x2fefd8", - "gasUsed": "0x78674", - "hash": "0x812742182a79a8e67733edc58cfa3767aa2d7ad06439d156ddbbb33e3403b4ed", - "index": "0x0", - "logs": [], - "to": null - } - } - }, - { - "data": { - "transaction": { - "block": { - "hash": "0x10aaf14a53caf27552325374429d3558398a36d3682ede6603c2c6511896e9f9", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - }, - "createdContract": { - "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f" - }, - "cumulativeGasUsed": "0x78674", - "from": { - "address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" - }, - "gas": "0x2fefd8", - "gasUsed": "0x78674", - "hash": "0x812742182a79a8e67733edc58cfa3767aa2d7ad06439d156ddbbb33e3403b4ed", - "index": 0, - "logs": [], - "to": null - } - } - } - ], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/34_eth_sendRawTransaction_contractCreation.json b/simulators/ethereum/graphql/testcases/34_eth_sendRawTransaction_contractCreation.json deleted file mode 100644 index 2f710211aa..0000000000 --- a/simulators/ethereum/graphql/testcases/34_eth_sendRawTransaction_contractCreation.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "request" : "mutation { sendRawTransaction(data: \"0xf901ca3285174876e800830fffff8080b90177608060405234801561001057600080fd5b50610157806100206000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633bdab8bf146100515780639ae97baa14610068575b600080fd5b34801561005d57600080fd5b5061006661007f565b005b34801561007457600080fd5b5061007d6100b9565b005b7fa53887c1eed04528e23301f55ad49a91634ef5021aa83a97d07fd16ed71c039a60016040518082815260200191505060405180910390a1565b7fa53887c1eed04528e23301f55ad49a91634ef5021aa83a97d07fd16ed71c039a60026040518082815260200191505060405180910390a17fa53887c1eed04528e23301f55ad49a91634ef5021aa83a97d07fd16ed71c039a60036040518082815260200191505060405180910390a15600a165627a7a7230582010ddaa52e73a98c06dbcd22b234b97206c1d7ed64a7c048e10c2043a3d2309cb00291ca05d71c687073e23402e59853d85c587f6eebc735082f40a450e407451b42ee2a4a07d4f2db1717dc9be745b991962193fa0d5f6059b9c92350dba3efe3a99df6b52\") }", - "responses":[{ - "data" : { - "sendRawTransaction" : "0xf9a25e1d6202e9ea1d984f76939e9bb3609bfb9aea2541ae8a629270343fbb2f" - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/35_graphql_pending.json b/simulators/ethereum/graphql/testcases/35_graphql_pending.json deleted file mode 100644 index 7aceb90647..0000000000 --- a/simulators/ethereum/graphql/testcases/35_graphql_pending.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "request": - "{ pending { transactionCount transactions { nonce gas } account(address:\"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\") { balance} estimateGas(data:{}) call (data : {from : \"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\", to: \"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\", data :\"0x12a7b914\"}){data status}} }", - - "responses": [{ - "data": { - "pending": { - "transactionCount": "0x1", - "transactions": [ - { - "nonce": "0x32", - "gas": "0xfffff" - } - ], - "account": { - "balance": "0x140" - }, - "estimateGas": "0x5208", - "call": { - "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "status": "0x1" - } - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/36_eth_sendRawTransaction_messageCall.json b/simulators/ethereum/graphql/testcases/36_eth_sendRawTransaction_messageCall.json deleted file mode 100644 index e5eace1ff7..0000000000 --- a/simulators/ethereum/graphql/testcases/36_eth_sendRawTransaction_messageCall.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "request" : "mutation { sendRawTransaction(data: \"0xf8693785174876e800830fffff94450b61224a7df4d8a70f3e20d4fd6a6380b920d180843bdab8bf1ba054b00220864ab58246bbe0a6f6d50166f9bd0ba3f1711912f79c073da6368ca5a04f84bc3231ee4406b8ceb8740d6d8d1900f87b67b9f4a0a38bc55062121a94c6\") }", - "responses":[{ - "data" : { - "sendRawTransaction" : "0x6ad12f495251471d1834852623c2eeb2cb04d2fb9e1a5d6cff481cfec7b233a8" - } - }], - - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/37_eth_sendRawTransaction_nonceTooLow.json b/simulators/ethereum/graphql/testcases/37_eth_sendRawTransaction_nonceTooLow.json deleted file mode 100644 index 5d677670fc..0000000000 --- a/simulators/ethereum/graphql/testcases/37_eth_sendRawTransaction_nonceTooLow.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "request": "mutation { sendRawTransaction(data: \"0xf86410018304cb2f946295ee1b4f6dd65047762f924ecd367c17eabf8f0a8457cb2fc41ca0060dc80554e845b572ab6b88dab08f7491f83b4405fea2f067a80b3742127fb0a0246160f01d027a0335be590d443335ecb2cf5d9f9589c8efffa4acbda4acafea\") }", - "responses": [{ - "errors": [ - { - "message": "Exception while fetching data (/sendRawTransaction) : Nonce too low", - "locations": [ - { - "line": 1, - "column": 12 - } - ], - "path": [ - "sendRawTransaction" - ], - "extensions": { - "errorCode": -32001, - "errorMessage": "Nonce too low", - "classification": "DataFetchingException" - } - } - ], - "data": null - }], - "statusCode": 400 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/38_eth_sendRawTransaction_transferEther.json b/simulators/ethereum/graphql/testcases/38_eth_sendRawTransaction_transferEther.json deleted file mode 100644 index 466d22f7f6..0000000000 --- a/simulators/ethereum/graphql/testcases/38_eth_sendRawTransaction_transferEther.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "request" : "mutation { sendRawTransaction(data: \"0xf86d3785174876e801830222e0945aae326516b4f8fe08074b7e972e40a713048d628829a2241af62c0000801ca077d36666ce36d433b6f1ac62eafe7a232354c83ad2293cfcc2445a86bcd08b4da04b8bd0918d440507ab81d47cf562addaa15a1d28ac701989f5141c8da49615d0\") }", - "responses":[{ - "data" : { - "sendRawTransaction" : "0x772b6d5c64b9798865d6dfa35ba44d181abd96a448f8ab7ea9e9631cabb7b290" - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/39_eth_sendRawTransaction_unsignedTransaction.json b/simulators/ethereum/graphql/testcases/39_eth_sendRawTransaction_unsignedTransaction.json deleted file mode 100644 index 30b83680aa..0000000000 --- a/simulators/ethereum/graphql/testcases/39_eth_sendRawTransaction_unsignedTransaction.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "request": "mutation { sendRawTransaction(data: \"0xed0a85174876e800830222e0945aae326516b4f8fe08074b7e972e40a713048d62880de0b6b3a7640000801c8080\") }", - "responses": [{ - "errors": [ - { - "message": "Exception while fetching data (/sendRawTransaction) : Invalid params", - "locations": [ - { - "line": 1, - "column": 12 - } - ], - "path": [ - "sendRawTransaction" - ], - "extensions": { - "errorCode": -32602, - "errorMessage": "Invalid params", - "classification": "DataFetchingException" - } - } - ], - "data": null - }], - "statusCode": 400 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/40_eth_syncing.json b/simulators/ethereum/graphql/testcases/40_eth_syncing.json deleted file mode 100644 index 3c9a1997c3..0000000000 --- a/simulators/ethereum/graphql/testcases/40_eth_syncing.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "request": - "{ syncing {startingBlock currentBlock highestBlock } }", - - "responses": [{ - "data" : { - "syncing" : null - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/41_graphql_blocks_byFrom.json b/simulators/ethereum/graphql/testcases/41_graphql_blocks_byFrom.json deleted file mode 100644 index 020f787807..0000000000 --- a/simulators/ethereum/graphql/testcases/41_graphql_blocks_byFrom.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "request": "{ blocks(from:30) { number } }", - "responses": [{ - "data": { - "blocks": [ - { - "number": "0x1e" - }, - { - "number": "0x1f" - }, - { - "number": "0x20" - }, - { - "number": "0x21" - } - ] - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/42_graphql_blocks_byRange.json b/simulators/ethereum/graphql/testcases/42_graphql_blocks_byRange.json deleted file mode 100644 index 1552e2de42..0000000000 --- a/simulators/ethereum/graphql/testcases/42_graphql_blocks_byRange.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "request": - - "{blocks (from : 30, to: 32) { number gasUsed gasLimit hash nonce stateRoot receiptsRoot transactionCount }} ", - - - "responses":[{ - "data" : { - "blocks" : [ { - "number" : "0x1e", - "gasUsed" : "0x5c21", - "gasLimit" : "0x2fefd8", - "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", - "nonce" : "0x5c321bd9e9f040f1", - "stateRoot" : "0xdb46d6bb168130fe2cb60b4b24346137b5741f11283e0d7edace65c5f5466b2e", - "receiptsRoot" : "0x88b3b304b058b39791c26fdb94a05cc16ce67cf8f84f7348cb3c60c0ff342d0d", - "transactionCount" : "0x1" - }, { - "number" : "0x1f", - "gasUsed" : "0x5eef", - "gasLimit" : "0x2fefd8", - "hash" : "0x0f765087745aa259d9e5ac39c367c57432a16ed98e3b0d81c5b51d10f301dc49", - "nonce" : "0xd3a27a3001616468", - "stateRoot" : "0xa80997cf804269d64f2479baf535cf8f9090b70fbf515741c6995564f1e678bd", - "receiptsRoot" : "0x2440c44a3f75ad8b0425a73e7be2f61a5171112465cfd14e62e735b56d7178e6", - "transactionCount" : "0x1" - }, { - "number" : "0x20", - "gasUsed" : "0x5c99", - "gasLimit" : "0x2fefd8", - "hash" : "0x71d59849ddd98543bdfbe8548f5eed559b07b8aaf196369f39134500eab68e53", - "nonce" : "0xdb063000b00e8026", - "stateRoot" : "0xf65f3dd13f72f5fa5607a5224691419969b4f4bae7a00a6cdb853f2ca9eeb1be", - "receiptsRoot" : "0xa50a7e67e833f4502524371ee462ccbcc6c6cabd2aeb1555c56150007a53183c", - "transactionCount" : "0x1" - } ] - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/43_graphql_blocks_byWrongRange.json b/simulators/ethereum/graphql/testcases/43_graphql_blocks_byWrongRange.json deleted file mode 100644 index 32e3f2c6c1..0000000000 --- a/simulators/ethereum/graphql/testcases/43_graphql_blocks_byWrongRange.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "request": "{blocks (from : \"0x1e\", to: \"0x1c\") { number gasUsed gasLimit hash nonce stateRoot receiptsRoot transactionCount }} ", - "responses": [{ - "errors": [ - { - "message": "Exception while fetching data (/blocks) : Invalid params", - "locations": [ - { - "line": 1, - "column": 2 - } - ], - "path": [ - "blocks" - ], - "extensions": { - "errorCode": -32602, - "errorMessage": "Invalid params", - "classification": "DataFetchingException" - } - } - ], - "data": null - }], - "statusCode": 400 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/44_getBlock_byHexNumber.json b/simulators/ethereum/graphql/testcases/44_getBlock_byHexNumber.json deleted file mode 100644 index 0d4e0ed79e..0000000000 --- a/simulators/ethereum/graphql/testcases/44_getBlock_byHexNumber.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "request": "{block (number : \"0x1e\") { gasUsed gasLimit hash }} ", - - "responses":[{ - "data" : { - "block" : { - "gasUsed" : "0x5c21", - "gasLimit" : "0x2fefd8", - "hash" : "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6" - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/45_eth_getLogs_range_hex.json b/simulators/ethereum/graphql/testcases/45_eth_getLogs_range_hex.json deleted file mode 100644 index f7891fc7d8..0000000000 --- a/simulators/ethereum/graphql/testcases/45_eth_getLogs_range_hex.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "request": "{ logs( filter: { fromBlock:\"0x14\", toBlock: \"0x18\", topics : [], addresses : []}) { index transaction{hash} } }", - "responses": [{ - "data": { - "logs": [ - { - "index": "0x0", - "transaction": { - "hash": "0x97a385bf570ced7821c6495b3877ddd2afd5c452f350f0d4876e98d9161389c6" - } - }, - { - "index": "0x0", - "transaction": { - "hash": "0x5ecd942096ab3f70c5bcc8f3a98f88c4ff0a3bd986417df9948eb1819db76d0e" - } - } - ] - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/46_transaction_fromByHexBlockNumber.json b/simulators/ethereum/graphql/testcases/46_transaction_fromByHexBlockNumber.json deleted file mode 100644 index 96ff90d147..0000000000 --- a/simulators/ethereum/graphql/testcases/46_transaction_fromByHexBlockNumber.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "request": "{transaction (hash : \"0x9cc6c7e602c56aa30c554bb691377f8703d778cec8845f4b88c0f72516b304f4\") { block { number } from(block: \"0x1d\") {transactionCount}} } ", - "responses": [ - { - "data": { - "transaction": { - "block": { - "number": "0x1e" - }, - "from": { - "transactionCount": "0x1d" - } - } - } - } - ], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/47_block_withdrawals_pre_shanghai.json b/simulators/ethereum/graphql/testcases/47_block_withdrawals_pre_shanghai.json deleted file mode 100644 index 1699f5c9d8..0000000000 --- a/simulators/ethereum/graphql/testcases/47_block_withdrawals_pre_shanghai.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "request": - "{ block (number: 32) { number withdrawalsRoot withdrawals { index amount } } }", - - "responses": [{ - "data" : { - "block" : { - "number" : "0x20", - "withdrawalsRoot": null, - "withdrawals": null - } - } - }], - "statusCode": 200 -} diff --git a/simulators/ethereum/graphql/testcases/48_block_withdrawals.json b/simulators/ethereum/graphql/testcases/48_block_withdrawals.json deleted file mode 100644 index 154c685f9e..0000000000 --- a/simulators/ethereum/graphql/testcases/48_block_withdrawals.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "request": - "{ block (number: 33) { number withdrawalsRoot withdrawals { index amount validator address } } }", - - "responses": [{ - "data" : { - "block" : { - "number" : "0x21", - "withdrawalsRoot": "0x37945ab58d2712a26df2a38d217e822694927e29b30d5993d7a53ccea618d1f3", - "withdrawals": [{ - "index": "0x0", - "amount": "0x2540be400", - "validator": "0xa", - "address": "0x0000000000000000000000000000000000000dad" - }] - } - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/49_get_type2Transaction.json b/simulators/ethereum/graphql/testcases/49_get_type2Transaction.json deleted file mode 100644 index 5ceb49f1f7..0000000000 --- a/simulators/ethereum/graphql/testcases/49_get_type2Transaction.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "request": "{transaction (hash : \"0x3ecd2ca6cf26c864d0ea5f038a58d4cd4a46a3e242fe92f446f392fdc232dd98\") { accessList { address storageKeys } maxFeePerGas maxPriorityFeePerGas nonce type status } } ", - "responses": [{ - "data": { - "transaction": { - "accessList": [{ - "address": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f", - "storageKeys": ["0x0000000000000000000000000000000000000000000000000000000000000000"] - }], - "maxFeePerGas": "0xb2d05e00", - "maxPriorityFeePerGas": "0x3b9aca00", - "nonce": "0x20", - "type": "0x2", - "status": "0x1" - } - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/graphql/testcases/50_eth_getBlock_shanghai.json b/simulators/ethereum/graphql/testcases/50_eth_getBlock_shanghai.json deleted file mode 100644 index 7c7d8bd588..0000000000 --- a/simulators/ethereum/graphql/testcases/50_eth_getBlock_shanghai.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "request": "{block (number : 33) { baseFeePerGas difficulty extraData miner { address } mixHash nonce stateRoot totalDifficulty withdrawalsRoot withdrawals { address amount index validator } }} ", - "responses":[{ - "data" : { - "block" : { - "baseFeePerGas": "0x3b9aca00", - "difficulty": "0x0", - "extraData": "0x", - "miner": { - "address": "0x0000000000000000000000000000000000000000" - }, - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "stateRoot": "0x0d3c456bb68669bad05da3a1a766daab236c9df1da8f74edf5ebe9383f00084c", - "totalDifficulty": "0x427c00", - "withdrawalsRoot": "0x37945ab58d2712a26df2a38d217e822694927e29b30d5993d7a53ccea618d1f3", - "withdrawals": [ - { - "address": "0x0000000000000000000000000000000000000dad", - "amount": "0x2540be400", - "index": "0x0", - "validator": "0xa" - } - ] - } - } - }], - "statusCode": 200 -} \ No newline at end of file diff --git a/simulators/ethereum/rpc-compat/Dockerfile b/simulators/ethereum/rpc-compat/Dockerfile index d338a2c1ef..40c33549a5 100644 --- a/simulators/ethereum/rpc-compat/Dockerfile +++ b/simulators/ethereum/rpc-compat/Dockerfile @@ -19,6 +19,6 @@ FROM alpine:latest ADD . /source WORKDIR /source COPY --from=builder /source/rpc-compat . -COPY --from=builder /execution-apis/tests ./tests +COPY --from=builder /execution-apis/tests/jsonrpc ./tests ENTRYPOINT ["./rpc-compat"]