Skip to content

Commit

Permalink
⬆️ Upgrade eRPC
Browse files Browse the repository at this point in the history
  • Loading branch information
KONFeature committed Aug 27, 2024
1 parent 0ec788a commit 8109d43
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 45 deletions.
2 changes: 1 addition & 1 deletion packages/erpc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base image is erpc
FROM ghcr.io/erpc/erpc:0.0.17
FROM ghcr.io/erpc/erpc:0.0.18

# Copy the config
COPY erpc.yaml /root/erpc.yaml
Expand Down
51 changes: 24 additions & 27 deletions packages/erpc/erpc-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
bundlersMethods,
envVariable,
} from "@konfeature/erpc-config-generator";
import type { RpcMethodWithRegex } from "@konfeature/erpc-config-generator";
import { buildErpcConfig, RpcMethodWithRegex } from "@konfeature/erpc-config-generator";
import type { EIP1474Methods } from "viem";
import {
arbitrum,
Expand Down Expand Up @@ -179,31 +179,28 @@ const nexusProject: ProjectConfig = buildProject({
});

// Build the global config
const config: Config = {
logLevel: envVariable("ERPC_LOG_LEVEL"),
database: {
evmJsonRpcCache: {
driver: "postgresql",
postgresql: {
connectionUri: envVariable("ERPC_DATABASE_URL"),
table: "rpc_cache",
export default buildErpcConfig({
config: {
logLevel: envVariable("ERPC_LOG_LEVEL"),
database: {
evmJsonRpcCache: {
driver: "postgresql",
postgresql: {
connectionUri: envVariable("ERPC_DATABASE_URL"),
table: "rpc_cache",
},
},
},
},
server: {
httpHost: "0.0.0.0",
httpPort: 8080,
maxTimeout: "60s",
},
metrics: {
enabled: true,
host: "0.0.0.0",
port: 4001,
},
projects: [ponderProject, nexusProject],
rateLimiters: {
budgets: [alchemyRateLimits, pimlicoRateLimits],
},
};

export default config;
server: {
httpPort: 8080,
maxTimeout: "60s",
},
metrics: {
enabled: true,
},
projects: [ponderProject, nexusProject],
rateLimiters: {
budgets: [alchemyRateLimits, pimlicoRateLimits],
},
}
});
8 changes: 5 additions & 3 deletions packages/erpc/erpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ database:
connectionUri: ${ERPC_DATABASE_URL}
table: rpc_cache
server:
httpHost: 0.0.0.0
httpPort: 8080
httpHostV4: 0.0.0.0
httpHostV6: "[::]"
maxTimeout: 60s
metrics:
enabled: true
host: 0.0.0.0
port: 4001
hostV4: 0.0.0.0
hostV6: "[::]"
enabled: true
projects:
- rateLimitBudget: ""
id: ponder-rpc
Expand Down
2 changes: 1 addition & 1 deletion packages/erpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@konfeature/erpc-config-generator": "0.0.7",
"@konfeature/erpc-config-generator": "0.0.8",
"@types/aws-lambda": "8.10.138",
"@types/node": "^22.4.0",
"aws-cdk-lib": "2.142.1",
Expand Down
21 changes: 8 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8109d43

Please sign in to comment.