Skip to content

Commit 6515f07

Browse files
committed
feat: add tempo
1 parent f226472 commit 6515f07

File tree

8 files changed

+960
-41
lines changed

8 files changed

+960
-41
lines changed

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Prool is a library that provides programmatic HTTP testing instances for Ethereu
3838

3939
Prool contains a set of pre-configured instances that can be used to simulate Ethereum server environments, being:
4040

41-
- **Local Execution Nodes:** [`anvil`](#anvil-execution-node)
41+
- **Local Execution Nodes:** [`anvil`](#anvil-execution-node), [`tempo`](#tempo-execution-node)
4242
- **ERC-4337 Bundler Nodes:** [`alto`](#alto-bundler-node)
4343

4444
You can also create your own custom instances by using the [`Instance.define` function](#instancedefine).
@@ -95,9 +95,29 @@ await server.start()
9595
// "http://localhost:8545/n"
9696
```
9797

98-
#### Parameters
98+
### Tempo (Execution Node)
9999

100-
See [`AnvilParameters`](https://github.com/wevm/prool/blob/801ede06ded8b2cb2d59c95294aae795e548897c/src/instances/anvil.ts#L5).
100+
#### Requirements
101+
102+
- [Tempo](https://docs.tempo.xyz/guide/node/installation) binary installed
103+
- Download: `curl -L https://tempo.xyz/install | bash`
104+
105+
#### Usage
106+
107+
```ts
108+
import { Instance, Server } from 'prool'
109+
110+
const server = Server.create({
111+
instance: Instance.tempo(),
112+
})
113+
114+
await server.start()
115+
// Instances accessible at:
116+
// "http://localhost:8545/1"
117+
// "http://localhost:8545/2"
118+
// "http://localhost:8545/3"
119+
// "http://localhost:8545/n"
120+
```
101121

102122
### Alto (Bundler Node)
103123

@@ -136,10 +156,6 @@ await bundlerServer.start()
136156
// "http://localhost:3000/n" (→ http://localhost:8545/n)
137157
```
138158

139-
#### Parameters
140-
141-
See [`AltoParameters`](https://github.com/wevm/prool/blob/801ede06ded8b2cb2d59c95294aae795e548897c/src/instances/alto.ts#L7).
142-
143159
## Reference
144160

145161
### `Server.create`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"check:types": "tsc",
88
"dev": "zile dev",
99
"postinstall": "pnpm dev",
10-
"test": "vitest"
10+
"test": "vitest --testTimeout=100000"
1111
},
1212
"devDependencies": {
1313
"@biomejs/biome": "^2.3.8",

0 commit comments

Comments
 (0)