diff --git a/lerna.json b/lerna.json index d9e24820..3d5540e2 100644 --- a/lerna.json +++ b/lerna.json @@ -3,7 +3,7 @@ "packages/*" ], "npmClient": "yarn", - "version": "2.0.4", + "version": "2.0.5", "stream": "true", "command": { "version": { diff --git a/package.json b/package.json index 98d7802e..cd2759c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "root", "private": true, - "version": "2.0.4", + "version": "2.0.5", "engines": { "node": ">=18.0.0" }, diff --git a/packages/api/package.json b/packages/api/package.json index 86015614..af456eee 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "The API module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -34,10 +34,10 @@ "dependencies": { "@fastify/cors": "9.0.1", "@fastify/websocket": "10.0.1", - "@skandha/executor": "^2.0.4", - "@skandha/monitoring": "^2.0.4", - "@skandha/types": "^2.0.4", - "@skandha/utils": "^2.0.4", + "@skandha/executor": "^2.0.5", + "@skandha/monitoring": "^2.0.5", + "@skandha/types": "^2.0.5", + "@skandha/utils": "^2.0.5", "class-transformer": "0.5.1", "class-validator": "0.14.1", "ethers": "5.7.2", diff --git a/packages/api/src/app.ts b/packages/api/src/app.ts index 673593ca..71020920 100644 --- a/packages/api/src/app.ts +++ b/packages/api/src/app.ts @@ -75,9 +75,20 @@ export class ApiApp { // HTTP interface this.server.http.post("/rpc/", async (req, res): Promise => { let response = null; - if (Array.isArray(req.body)) { + let { body } = req; + if (typeof body === "string") { + try { + body = JSON.parse(body); + } catch (err) { + throw new RpcError( + "Cannot parse request", + RpcErrorCodes.INVALID_REQUEST + ); + } + } + if (Array.isArray(body)) { response = []; - for (const request of req.body) { + for (const request of body) { response.push( await this.handleRpcRequest( request, @@ -88,7 +99,7 @@ export class ApiApp { } } else { response = await this.handleRpcRequest( - req.body as JsonRpcRequest, + body as JsonRpcRequest, req.ip, req.headers.authorization ); diff --git a/packages/cli/package.json b/packages/cli/package.json index efadb3af..4bc83b3c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "> TODO: description", "author": "zincoshine ", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -40,12 +40,12 @@ "@libp2p/peer-id-factory": "2.0.1", "@libp2p/prometheus-metrics": "1.1.3", "@multiformats/multiaddr": "12.1.3", - "@skandha/api": "^2.0.4", - "@skandha/db": "^2.0.4", - "@skandha/executor": "^2.0.4", - "@skandha/monitoring": "^2.0.4", - "@skandha/node": "^2.0.4", - "@skandha/types": "^2.0.4", + "@skandha/api": "^2.0.5", + "@skandha/db": "^2.0.5", + "@skandha/executor": "^2.0.5", + "@skandha/monitoring": "^2.0.5", + "@skandha/node": "^2.0.5", + "@skandha/types": "^2.0.5", "find-up": "5.0.0", "got": "12.5.3", "js-yaml": "4.1.0", diff --git a/packages/db/package.json b/packages/db/package.json index 7043efc1..ec73e97a 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "The DB module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://github.com/etherspot/etherspot-bundler#readme", @@ -34,7 +34,7 @@ "dependencies": { "@chainsafe/ssz": "0.10.1", "@farcaster/rocksdb": "5.5.0", - "@skandha/types": "^2.0.4" + "@skandha/types": "^2.0.5" }, "devDependencies": { "@types/rocksdb": "3.0.1", diff --git a/packages/executor/package.json b/packages/executor/package.json index 4a861bc3..243945ed 100644 --- a/packages/executor/package.json +++ b/packages/executor/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "The Relayer module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -35,10 +35,10 @@ }, "dependencies": { "@flashbots/ethers-provider-bundle": "0.6.2", - "@skandha/monitoring": "^2.0.4", - "@skandha/params": "^2.0.4", - "@skandha/types": "^2.0.4", - "@skandha/utils": "^2.0.4", + "@skandha/monitoring": "^2.0.5", + "@skandha/params": "^2.0.5", + "@skandha/types": "^2.0.5", + "@skandha/utils": "^2.0.5", "async-mutex": "0.4.0", "ethers": "5.7.2", "strict-event-emitter-types": "2.0.0", diff --git a/packages/monitoring/package.json b/packages/monitoring/package.json index 6c0e1fb0..d00dfa94 100644 --- a/packages/monitoring/package.json +++ b/packages/monitoring/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "The Monitoring module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://github.com/etherspot/etherspot-bundler#readme", @@ -32,7 +32,7 @@ "check-readme": "typescript-docs-verifier" }, "dependencies": { - "@skandha/types": "^2.0.4", + "@skandha/types": "^2.0.5", "prom-client": "15.1.0" } } diff --git a/packages/node/package.json b/packages/node/package.json index 31e21fa1..433c8c47 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "The bundler node module of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -56,13 +56,13 @@ "@libp2p/prometheus-metrics": "1.1.3", "@libp2p/tcp": "6.1.0", "@multiformats/multiaddr": "11.4.0", - "@skandha/api": "^2.0.4", - "@skandha/db": "^2.0.4", - "@skandha/executor": "^2.0.4", - "@skandha/monitoring": "^2.0.4", - "@skandha/params": "^2.0.4", - "@skandha/types": "^2.0.4", - "@skandha/utils": "^2.0.4", + "@skandha/api": "^2.0.5", + "@skandha/db": "^2.0.5", + "@skandha/executor": "^2.0.5", + "@skandha/monitoring": "^2.0.5", + "@skandha/params": "^2.0.5", + "@skandha/types": "^2.0.5", + "@skandha/utils": "^2.0.5", "abstract-leveldown": "7.2.0", "datastore-core": "8.0.1", "ethers": "5.7.2", diff --git a/packages/params/package.json b/packages/params/package.json index be42f27e..1620e336 100644 --- a/packages/params/package.json +++ b/packages/params/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "Various bundler parameters", "author": "Etherspot", "homepage": "https://github.com/etherspot/skandha#readme", @@ -28,8 +28,8 @@ "@arbitrum/sdk": "3.1.4", "@chainsafe/ssz": "0.10.1", "@mantleio/sdk": "0.2.1", - "@skandha/types": "^2.0.4", - "@skandha/utils": "^2.0.4", + "@skandha/types": "^2.0.5", + "@skandha/utils": "^2.0.5", "ethers": "5.7.2" }, "scripts": { diff --git a/packages/types/package.json b/packages/types/package.json index f8276ff8..fff25980 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "The types of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", diff --git a/packages/utils/package.json b/packages/utils/package.json index 94f8dd18..c80028ec 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "2.0.4", + "version": "2.0.5", "description": "utils of Etherspot bundler client", "author": "Etherspot", "homepage": "https://https://github.com/etherspot/skandha#readme", @@ -33,7 +33,7 @@ }, "dependencies": { "@chainsafe/as-sha256": "0.3.1", - "@skandha/types": "^2.0.4", + "@skandha/types": "^2.0.5", "any-signal": "3.0.1", "bigint-buffer": "1.1.5", "case": "^1.6.3",