Skip to content

Commit

Permalink
feat(paymaster): mock paymaster
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Jul 29, 2024
1 parent b374368 commit e270d93
Show file tree
Hide file tree
Showing 13 changed files with 2,907 additions and 32 deletions.
5 changes: 5 additions & 0 deletions .changeset/fifty-bees-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/mock-paymaster": minor
---

mock paymaster
1 change: 1 addition & 0 deletions packages/mock-verifying-paymaster/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
54 changes: 54 additions & 0 deletions packages/mock-verifying-paymaster/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
services:
anvil:
image: cartesi/sdk:0.9.0
command:
[
"devnet",
"--block-time",
"${BLOCK_TIME:-5}",
"${ANVIL_VERBOSITY:---silent}",
]
healthcheck:
test: ["CMD", "eth_isready"]
interval: 10s
timeout: 1s
retries: 5
environment:
ANVIL_IP_ADDR: 0.0.0.0
ports:
- 8545:8545

alto:
image: cartesi/sdk:0.9.0
command:
[
"alto",
"--entrypoints",
"0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789,0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"--log-level",
"info",
"--entrypoint-simulation-contract",
"0x74Cb5e4eE81b86e70f9045036a1C5477de69eE87",
"--rpc-url",
"http://anvil:8545",
"--min-executor-balance",
"0",
"--utility-private-key",
"0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97",
"--executor-private-keys",
"0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6,0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356,0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e,0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba,0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a",
"--max-block-range",
"10000",
"--safe-mode",
"false",
"--port",
"4337",
"--public-client-log-level",
"error",
"--wallet-client-log-level",
"error",
"--polling-interval",
"100",
"--enable-debug-endpoints",
]
ports: ["4337:4337"]
31 changes: 31 additions & 0 deletions packages/mock-verifying-paymaster/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "@cartesi/mock-paymaster",
"version": "0.0.0",
"bin": {
"mock-paymaster": "./dist/index.js"
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"start": "ts-node src/index.ts"
},
"dependencies": {
"@fastify/cors": "^9.0.1",
"fastify": "^4.26.2",
"permissionless": "^0.1.43",
"tslib": "^2.6.2",
"viem": "2.18.4",
"zod": "^3.22.4",
"zod-validation-error": "^3.0.3"
},
"devDependencies": {
"@types/node": "^22.0.0",
"tsconfig": "workspace:*",
"ts-node": "^10.9.2",
"tsup": "^8.2.3",
"typescript": "5.5.4",
"wait-port": "^1.0.4"
}
}
Loading

0 comments on commit e270d93

Please sign in to comment.