diff --git a/.github/workflows/hoppscotch.yml b/.github/workflows/hoppscotch.yml new file mode 100644 index 0000000000..cd62958455 --- /dev/null +++ b/.github/workflows/hoppscotch.yml @@ -0,0 +1,67 @@ +name: Hoppscotch Endpoint Tests + +on: + pull_request: + branches: [main, release/**] + push: + branches: [main, release/**] + tags: [v*] + workflow_dispatch: + +concurrency: + group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + setup-local-hedera: + name: Hoppscotch Endpoint Tests + runs-on: hiero-smart-contracts-linux-medium + permissions: + contents: write + actions: read + steps: + - name: Harden Runner + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + + - name: Install build tools + run: sudo apt-get update && sudo apt-get install -y make gcc g++ + + - name: Setup node + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + with: + node-version: 22 + + - name: Checkout repo + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + + - name: Install packages + run: npm ci + + - name: Create .env file + run: cp ./packages/server/tests/localAcceptance.env .env + + - name: Install pnpm + run: npm install -g pnpm + + - name: Build Typescript + run: npx lerna run build + + - name: Start the hedera local node + run: npx hedera start -d + + - name: Stop the local node's relay + run: docker stop json-rpc-relay + + - name: Start the local relay + run: npm run start & + + - name: Install Hoppscotch CLI + run: npm install -g @hoppscotch/cli + + - name: Run Hoppscotch Tests + run: BASE_URL=http://127.0.0.1:7546 hopp test packages/server/tests/hoppscotch.json diff --git a/.github/workflows/postman.yml b/.github/workflows/postman.yml deleted file mode 100644 index 3fa447c7de..0000000000 --- a/.github/workflows/postman.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Postman Endpoint Tests - -# Disabled newman temporarily -on: - workflow_dispatch: # Manual trigger only -# Disabled triggers: -# pull_request: -# branches: [ main, release/** ] -# push: -# branches: [ main, release/** ] -# tags: [ v* ] - -concurrency: - group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - setup-local-hedera: - name: Postman Endpoint Tests - runs-on: hiero-smart-contracts-linux-medium - permissions: - contents: write - actions: read - steps: - - name: Harden Runner - uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 - with: - egress-policy: audit - - - name: Install build tools - run: sudo apt-get update && sudo apt-get install -y make gcc g++ - - - name: Setup node - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 - with: - node-version: 22 - - - name: Checkout repo - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - - name: Install packages - run: npm ci - - - name: Create .env file - run: cp ./packages/server/tests/localAcceptance.env .env - - - name: Install pnpm - run: npm install -g pnpm - - - name: Build Typescript - run: npx lerna run build - - - name: Start the hedera local node - run: npx hedera start -d - - - name: Stop the local node's relay - run: docker stop json-rpc-relay - - - name: Start the local relay - run: npm run start & - - # - name: Install newman - # run: npm install -g newman - - # - name: Run the newman script - # run: newman run packages/server/tests/postman.json - - - name: Security Warning - run: | - echo "CRITICAL: This workflow is disabled due to Newman security compromise" - echo "DO NOT re-enable until Newman is replaced with a secure alternative" - exit 1 diff --git a/README.md b/README.md index 4dcbcee1a6..7fb87810ad 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,24 @@ run configuration. You should be able to just run that configuration, and it sho - It is highly recommended to read the [Testing Guide](docs/testing-guide.md) for detailed testing strategies and best practices. +### Hoppscotch + +First ensure `@hoppscotch/cli` is installed locally using `npm`, then execute `hopp`. + +```shell +npm install -g @hoppscotch/cli +BASE_URL=http://localhost:7546 hopp test packages/server/tests/hoppscotch.json +``` + +To enable Hoppscotch test to run via helm deployment add + +``` +test: + enabled: true + schedule: '@daily' #How often to run the Hoppscotch test + baseUrl: "http://127.0.0.1:7546" # Relay URL to run the test against +``` + ### Acceptance Tests The relay has a suite of acceptance tests that may be run to confirm E2E operation of the relay in either a `hedera-local-node` or deployed env. diff --git a/charts/hedera-json-rpc-relay/hoppscotch.json b/charts/hedera-json-rpc-relay/hoppscotch.json new file mode 100644 index 0000000000..8dba30e926 --- /dev/null +++ b/charts/hedera-json-rpc-relay/hoppscotch.json @@ -0,0 +1,722 @@ +[ + { + "v": 11, + "name": "Relay", + "folders": [], + "requests": [ + { + "v": "17", + "name": "eth_accounts", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [ + { + "key": "Content-Type", + "value": "application/json", + "active": true + } + ], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_accounts\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_blockNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_blockNumber\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_chainId", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_chainId\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_estimateGas", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_estimateGas\",\n \"params\": [{\"to\":\"0xd3CdA913deB6f67967B99D67aCDFa1712C293601\", \"value\":\"0x1\"}]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_feeHistory", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_feeHistory\",\n \"params\": [\"0x3\", \"latest\", [25, 75]]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_gasPrice", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_gasPrice\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getBalance", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBalance\",\n \"params\": [\"0x0000000000000000000000000000000000000002\", \"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getBlockByNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\"id\": \"test_id\",\"jsonrpc\": \"2.0\",\"method\": \"eth_getBlockByNumber\",\"params\": [\"latest\", true]}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getBlockTransactionCountByNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBlockTransactionCountByNumber\",\n \"params\": [\n \"latest\"\n ]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getTransactionReceipt", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionReceipt\",\n \"params\": [\"0x0000000000000000000000000000000000000000000000000000000000000001\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleByBlockHashAndIndex", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockHashAndIndex\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\", \"0x0\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleByBlockNumberAndIndex", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n \"params\": [\"latest\", \"0x0\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleCountByBlockHash", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockHash\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleCountByBlockNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockNumber\",\n \"params\": [\"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getWork", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getWork\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "unsupported_function", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"unsupported_function\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "invalid_request", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_hashrate", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_hashrate\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_mining", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_mining\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_submitWork", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_submitWork\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_syncing", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_syncing\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "net_listening", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_listening\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "net_version", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_version\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "net_peerCount", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_peerCount\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "web3_clientVersion", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_clientVersion\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "web3_sha3", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_sha3\",\n \"params\": [\"0x5644\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getTransactionCount", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionCount\",\n \"params\": [\n \"0x0000000000000000000000000000000000000002\", \"latest\"\n ]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "engine_getPayloadV1", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"engine_getPayloadV1\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "engine_anyMethod", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"engine_anyMethod\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "trace_block", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_block\",\n \"params\": [\"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "trace_anyMethod", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_anyMethod\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "debug_traceBlockByHash", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "debug_anyMethod", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_anyMethod\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + } + ], + "auth": { + "authType": "inherit", + "authActive": true + }, + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "variables": [ + { + "key": "BASE_URL", + "initialValue": "http://127.0.0.1:7546", + "currentValue": "http://127.0.0.1:7546", + "secret": false + } + ], + "description": null + } +] diff --git a/charts/hedera-json-rpc-relay/postman.json b/charts/hedera-json-rpc-relay/postman.json deleted file mode 100644 index 3e2245acd1..0000000000 --- a/charts/hedera-json-rpc-relay/postman.json +++ /dev/null @@ -1,1074 +0,0 @@ -{ - "info": { - "_postman_id": "351c728f-14b0-4b18-a499-4b100b68a822", - "name": "Relay", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "21244258" - }, - "item": [ - { - "name": "eth_accounts", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.an(\"array\");", - " pm.expect(response.result).length(0);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_accounts\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_blockNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_blockNumber\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_chainId", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_chainId\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_estimateGas", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_estimateGas\",\n \"params\": [{\"to\":\"0xd3CdA913deB6f67967B99D67aCDFa1712C293601\", \"value\":\"0x1\"}]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_feeHistory", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result.baseFeePerGas).to.be.an(\"array\");", - " pm.expect(response.result.baseFeePerGas).length(4);", - " pm.expect(response.result.gasUsedRatio).to.be.an(\"array\");", - " pm.expect(response.result.gasUsedRatio).length(3);", - " pm.expect(response.result.oldestBlock).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.reward).to.be.an(\"array\");", - " pm.expect(response.result.reward).length(3);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_feeHistory\",\n \"params\": [\"0x3\", \"latest\", [25, 75]]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_gasPrice", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_gasPrice\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getBalance", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBalance\",\n \"params\": [\"0x0000000000000000000000000000000000000002\", \"latest\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getBlockByNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result.timestamp).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.difficulty).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.extraData).to.match(/^0x$/);", - " pm.expect(response.result.gasLimit).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.baseFeePerGas).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.gasUsed).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.logsBloom).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.miner).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.mixHash).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.nonce).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.receiptsRoot).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.sha3Uncles).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.size).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.stateRoot).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.totalDifficulty).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.transactions).to.be.an(\"array\");", - " pm.expect(response.result.transactionsRoot).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.uncles).to.be.an(\"array\");", - " pm.expect(response.result.number).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.hash).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.parentHash).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\"id\": \"test_id\",\"jsonrpc\": \"2.0\",\"method\": \"eth_getBlockByNumber\",\"params\": [\"latest\", true]}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getBlockTransactionCountByNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBlockTransactionCountByNumber\",\n \"params\": [\n \"latest\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getTransactionReceipt", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.null;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionReceipt\",\n \"params\": [\"0x0000000000000000000000000000000000000000000000000000000000000001\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleByBlockHashAndIndex", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.null;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockHashAndIndex\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\", \"0x0\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleByBlockNumberAndIndex", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.null;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n \"params\": [\"latest\", \"0x0\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleCountByBlockHash", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(\"0x0\");", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockHash\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleCountByBlockNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(\"0x0\");", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockNumber\",\n \"params\": [\"latest\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getWork", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Unsupported JSON-RPC method\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getWork\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_blobBaseFee", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Unsupported JSON-RPC method\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_blobBaseFee\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "unsupported_function", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message).to.match(/\\[Request ID: [0-9a-fA-F-]{36}\\] Method unsupported_function not found/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"unsupported_function\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "invalid_request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32600);", - " pm.expect(response.error.message).to.match(/\\[Request ID: [0-9a-fA-F-]{36}\\] Invalid Request/);", - " pm.expect(response.id).is.null;", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_hashrate", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(\"0x0\");", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_hashrate\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_mining", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(false);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_mining\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_submitWork", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(false);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_submitWork\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_syncing", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(false);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_syncing\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "net_listening", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_listening\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "net_version", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^\\d+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_version\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "web3_clientVersion", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^relay[/]/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_clientVersion\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getTransactionCount", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionCount\",\n \"params\": [\n \"0x0000000000000000000000000000000000000002\", \"latest\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [""] - } - } - ], - "variable": [ - { - "key": "baseUrl", - "value": "localhost:7546", - "type": "string" - } - ] -} diff --git a/charts/hedera-json-rpc-relay/templates/cronjob.yaml b/charts/hedera-json-rpc-relay/templates/cronjob.yaml index b1b596dfe5..ff4079ff85 100644 --- a/charts/hedera-json-rpc-relay/templates/cronjob.yaml +++ b/charts/hedera-json-rpc-relay/templates/cronjob.yaml @@ -27,8 +27,7 @@ spec: {{- end }} --- -# Disabled newman temporarily -{{- if false }} # Force disabled - was: .Values.cronjob.enabled +{{- if .Values.cronjob.enabled }} apiVersion: batch/v1 kind: CronJob metadata: @@ -45,12 +44,12 @@ spec: serviceAccountName: {{ include "json-rpc-relay.serviceAccountName" . }}-test restartPolicy: Never containers: - - name: newman + - name: hoppscotch image: "{{ .Values.cronjob.image.repository }}:{{ .Values.cronjob.image.tag }}" imagePullPolicy: {{ .Values.cronjob.image.pullPolicy }} command: - /bin/sh - -c - - wget https://raw.githubusercontent.com/hiero-ledger/hiero-json-rpc-relay/main/charts/hedera-json-rpc-relay/postman.json ; newman run postman.json --env-var baseUrl=http://{{ include "json-rpc-relay.fullname" . }}:{{ .Values.service.port }} + - wget https://raw.githubusercontent.com/hiero-ledger/hiero-json-rpc-relay/main/charts/hedera-json-rpc-relay/hoppscotch.json ; BASE_URL=http://{{ include "json-rpc-relay.fullname" . }}:{{ .Values.service.port }} hopp test hoppscotch.json {{- end }} \ No newline at end of file diff --git a/charts/hedera-json-rpc-relay/templates/tests/configmap.yaml b/charts/hedera-json-rpc-relay/templates/tests/configmap.yaml index 634f5d30e7..c2f540a684 100644 --- a/charts/hedera-json-rpc-relay/templates/tests/configmap.yaml +++ b/charts/hedera-json-rpc-relay/templates/tests/configmap.yaml @@ -9,6 +9,6 @@ metadata: name: {{ include "json-rpc-relay.fullname" . }}-test namespace: {{ include "json-rpc-relay.namespace" . }} data: - postman.json: |- - {{- .Values.test.postman | b64dec | default (.Files.Get "postman.json") | nindent 4 }} + hoppscotch.json: |- + {{- .Values.test.hoppscotch | b64dec | default (.Files.Get "hoppscotch.json") | nindent 4 }} {{- end -}} diff --git a/charts/hedera-json-rpc-relay/templates/tests/pod.yaml b/charts/hedera-json-rpc-relay/templates/tests/pod.yaml index cf67676482..930175eba4 100644 --- a/charts/hedera-json-rpc-relay/templates/tests/pod.yaml +++ b/charts/hedera-json-rpc-relay/templates/tests/pod.yaml @@ -1,5 +1,4 @@ -# Disabled newman temporarily -{{- if false }} # Force disabled - was: .Values.test.enabled +{{- if .Values.test.enabled }} apiVersion: v1 kind: Pod metadata: @@ -14,11 +13,12 @@ spec: - name: test image: "{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}" imagePullPolicy: {{ .Values.test.image.pullPolicy }} + env: + - name: BASE_URL + value: 'http://{{ include "json-rpc-relay.fullname" . }}:{{ .Values.service.port }}' args: - - run - - /test/postman.json - - --env-var - - baseUrl=http://{{ include "json-rpc-relay.fullname" . }}:{{ .Values.service.port }} + - test + - /test/hoppscotch.json securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/charts/hedera-json-rpc-relay/values.yaml b/charts/hedera-json-rpc-relay/values.yaml index 0ee5c16ec3..096064df42 100644 --- a/charts/hedera-json-rpc-relay/values.yaml +++ b/charts/hedera-json-rpc-relay/values.yaml @@ -138,15 +138,14 @@ redis: # REDIS_URL=redis://-redis-master:6379 autoconfig: true -# Disabled newman temporarily cronjob: enabled: false image: pullPolicy: IfNotPresent - repository: postman/newman - tag: 5.3.1-alpine - # Custom postman.json in base64 encoding - postman: '' + repository: hoppscotch/hopp-cli + tag: latest + # Custom hoppscotch.json in base64 encoding + hoppscotch: '' schedule: '@daily' fullnameOverride: '' @@ -246,15 +245,14 @@ readinessProbe: initialDelaySeconds: 20 timeoutSeconds: 5 -# Disabled newman temporarily test: enabled: false image: pullPolicy: IfNotPresent - repository: postman/newman - tag: 5.3.1-alpine - # Custom postman.json in base64 encoding - postman: '' + repository: hoppscotch/hopp-cli + tag: latest + # Custom hoppscotch.json in base64 encoding + hoppscotch: '' terminationGracePeriodSeconds: 60 diff --git a/packages/server/tests/hoppscotch.json b/packages/server/tests/hoppscotch.json new file mode 100644 index 0000000000..8dba30e926 --- /dev/null +++ b/packages/server/tests/hoppscotch.json @@ -0,0 +1,722 @@ +[ + { + "v": 11, + "name": "Relay", + "folders": [], + "requests": [ + { + "v": "17", + "name": "eth_accounts", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [ + { + "key": "Content-Type", + "value": "application/json", + "active": true + } + ], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_accounts\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_blockNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_blockNumber\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_chainId", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_chainId\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_estimateGas", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_estimateGas\",\n \"params\": [{\"to\":\"0xd3CdA913deB6f67967B99D67aCDFa1712C293601\", \"value\":\"0x1\"}]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_feeHistory", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_feeHistory\",\n \"params\": [\"0x3\", \"latest\", [25, 75]]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_gasPrice", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_gasPrice\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getBalance", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBalance\",\n \"params\": [\"0x0000000000000000000000000000000000000002\", \"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getBlockByNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\"id\": \"test_id\",\"jsonrpc\": \"2.0\",\"method\": \"eth_getBlockByNumber\",\"params\": [\"latest\", true]}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getBlockTransactionCountByNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBlockTransactionCountByNumber\",\n \"params\": [\n \"latest\"\n ]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getTransactionReceipt", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionReceipt\",\n \"params\": [\"0x0000000000000000000000000000000000000000000000000000000000000001\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleByBlockHashAndIndex", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockHashAndIndex\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\", \"0x0\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleByBlockNumberAndIndex", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n \"params\": [\"latest\", \"0x0\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleCountByBlockHash", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockHash\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getUncleCountByBlockNumber", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockNumber\",\n \"params\": [\"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getWork", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getWork\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "unsupported_function", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"unsupported_function\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "invalid_request", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_hashrate", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_hashrate\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_mining", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_mining\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_submitWork", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_submitWork\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_syncing", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_syncing\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "net_listening", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_listening\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "net_version", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_version\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "net_peerCount", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_peerCount\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "web3_clientVersion", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_clientVersion\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "web3_sha3", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_sha3\",\n \"params\": [\"0x5644\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "eth_getTransactionCount", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionCount\",\n \"params\": [\n \"0x0000000000000000000000000000000000000002\", \"latest\"\n ]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "engine_getPayloadV1", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"engine_getPayloadV1\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "engine_anyMethod", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"engine_anyMethod\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "trace_block", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_block\",\n \"params\": [\"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "trace_anyMethod", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_anyMethod\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "debug_traceBlockByHash", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\"latest\"]\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + }, + { + "v": "17", + "name": "debug_anyMethod", + "method": "POST", + "endpoint": "<>", + "params": [], + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "preRequestScript": "", + "testScript": "", + "auth": { + "authType": "inherit", + "authActive": true + }, + "body": { + "contentType": "application/json", + "body": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_anyMethod\",\n \"params\": []\n}" + }, + "requestVariables": [], + "responses": {}, + "description": null + } + ], + "auth": { + "authType": "inherit", + "authActive": true + }, + "headers": [{ "key": "Content-Type", "value": "application/json", "active": true }], + "variables": [ + { + "key": "BASE_URL", + "initialValue": "http://127.0.0.1:7546", + "currentValue": "http://127.0.0.1:7546", + "secret": false + } + ], + "description": null + } +] diff --git a/packages/server/tests/postman.json b/packages/server/tests/postman.json deleted file mode 100644 index d66be52333..0000000000 --- a/packages/server/tests/postman.json +++ /dev/null @@ -1,1348 +0,0 @@ -{ - "info": { - "_postman_id": "351c728f-14b0-4b18-a499-4b100b68a822", - "name": "Relay", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "21244258" - }, - "item": [ - { - "name": "eth_accounts", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.an(\"array\");", - " pm.expect(response.result).length(0);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_accounts\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_blockNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_blockNumber\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_chainId", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_chainId\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_estimateGas", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_estimateGas\",\n \"params\": [{\"to\":\"0xd3CdA913deB6f67967B99D67aCDFa1712C293601\", \"value\":\"0x1\"}]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_feeHistory", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result.baseFeePerGas).to.be.an(\"array\");", - " pm.expect(response.result.baseFeePerGas).length(4);", - " pm.expect(response.result.gasUsedRatio).to.be.an(\"array\");", - " pm.expect(response.result.gasUsedRatio).length(3);", - " pm.expect(response.result.oldestBlock).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.reward).to.be.an(\"array\");", - " pm.expect(response.result.reward).length(3);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_feeHistory\",\n \"params\": [\"0x3\", \"latest\", [25, 75]]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_gasPrice", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_gasPrice\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getBalance", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBalance\",\n \"params\": [\"0x0000000000000000000000000000000000000002\", \"latest\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getBlockByNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result.timestamp).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.difficulty).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.extraData).to.match(/^0x$/);", - " pm.expect(response.result.gasLimit).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.baseFeePerGas).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.gasUsed).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.logsBloom).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.miner).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.mixHash).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.nonce).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.receiptsRoot).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.sha3Uncles).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.size).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.stateRoot).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.totalDifficulty).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.transactions).to.be.an(\"array\");", - " pm.expect(response.result.transactionsRoot).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.uncles).to.be.an(\"array\");", - " pm.expect(response.result.number).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.hash).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.result.parentHash).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\"id\": \"test_id\",\"jsonrpc\": \"2.0\",\"method\": \"eth_getBlockByNumber\",\"params\": [\"latest\", true]}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getBlockTransactionCountByNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBlockTransactionCountByNumber\",\n \"params\": [\n \"latest\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getTransactionReceipt", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.null;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionReceipt\",\n \"params\": [\"0x0000000000000000000000000000000000000000000000000000000000000001\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleByBlockHashAndIndex", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.null;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockHashAndIndex\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\", \"0x0\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleByBlockNumberAndIndex", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.null;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleByBlockNumberAndIndex\",\n \"params\": [\"latest\", \"0x0\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleCountByBlockHash", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " console.log(response);", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(\"0x0\");", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockHash\",\n \"params\": [\"0xa291866ddf5dfd7ac83d079614ac60ab412df7c55e4d91408b2f365581405ca8\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getUncleCountByBlockNumber", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(\"0x0\");", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getUncleCountByBlockNumber\",\n \"params\": [\"latest\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getWork", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Unsupported JSON-RPC method\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getWork\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "unsupported_function", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message).to.match(/\\[Request ID: [0-9a-fA-F-]{36}\\] Method unsupported_function not found/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"unsupported_function\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "invalid_request", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32600);", - " pm.expect(response.error.message).to.match(/\\[Request ID: [0-9a-fA-F-]{36}\\] Invalid Request/);", - " pm.expect(response.id).is.null;", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_hashrate", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(\"0x0\");", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_hashrate\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_mining", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(false);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_mining\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_submitWork", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(false);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_submitWork\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_syncing", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.equal(false);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_syncing\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "net_listening", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_listening\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "net_version", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^\\d+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_version\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "net_peerCount", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Unsupported JSON-RPC method\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"net_peerCount\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "web3_clientVersion", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^relay[/]/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_clientVersion\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "web3_sha3", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0xf956fddff3899ff3cf7ac1773fdbf443ffbfb625c1a673abdba8947251f81bae/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"web3_sha3\",\n \"params\": [\"0x5644\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "eth_getTransactionCount", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(JSON.stringify(response.error)).to.equal(undefined);", - " pm.expect(response.result).to.match(/^0x[a-f0-9]+$/);", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getTransactionCount\",\n \"params\": [\n \"0x0000000000000000000000000000000000000002\", \"latest\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "engine_getPayloadV1", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Unsupported JSON-RPC method\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"engine_getPayloadV1\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "engine_anyMethod", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Unsupported JSON-RPC method\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"engine_anyMethod\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "trace_block", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Not yet implemented\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_block\",\n \"params\": [\"latest\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "trace_anyMethod", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Not yet implemented\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"trace_anyMethod\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "debug_traceBlockByHash", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Not yet implemented\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_traceBlockByHash\",\n \"params\": [\"latest\"]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - }, - { - "name": "debug_anyMethod", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Success\", () => {", - " var response = pm.response.json();", - " pm.expect(response.error.code).to.equal(-32601);", - " pm.expect(response.error.message.endsWith(\"Not yet implemented\")).to.be.true;", - " pm.expect(response.id).to.equal(\"test_id\");", - " pm.expect(response.jsonrpc).to.equal(\"2.0\");", - "});", - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": \"test_id\",\n \"jsonrpc\": \"2.0\",\n \"method\": \"debug_anyMethod\",\n \"params\": []\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}", - "host": ["{{baseUrl}}"] - } - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [""] - } - } - ], - "variable": [ - { - "key": "baseUrl", - "value": "localhost:7546", - "type": "string" - } - ] -}