You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: typescript/solver/README.md
+44-32Lines changed: 44 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,45 +15,56 @@ The solver directory contains the implementation of the Intent Solver, a TypeScr
15
15
solver/
16
16
├── index.ts
17
17
├── logger.ts
18
+
├── NonceKeeperWallet.ts
18
19
├── patch-bigint-buffer-warn.js
19
-
├── solvers/
20
-
│ ├── BaseListener.ts
21
-
│ ├── eco/
22
-
│ │ ├── listener.ts
23
-
│ │ ├── filler.ts
24
-
│ │ └── contracts/
25
-
│ ├── onChain/
26
-
│ │ ├── listener.ts
27
-
│ │ ├── filler.ts
28
-
│ │ └── contracts/
29
-
│ └── index.ts
30
-
├── types.ts
31
-
├── package.json
32
-
└── tsconfig.json
20
+
├── test/
21
+
├── config/
22
+
│ ├── index.ts
23
+
│ ├── allowBlockLists.ts
24
+
│ ├── chainMetadata.ts
25
+
│ └── types.ts
26
+
└── solvers/
27
+
├── index.ts
28
+
├── BaseFiller.ts
29
+
├── BaseListener.ts
30
+
├── types.ts
31
+
├── utils.ts
32
+
├── contracts/
33
+
└── <eco|hyperlane7683>/
34
+
├── index.ts
35
+
├── listener.ts
36
+
├── filler.ts
37
+
├── types.ts
38
+
├── utils.ts
39
+
├── contracts/
40
+
└── config/
41
+
├── index.ts
42
+
├── metadata.ts
43
+
└── allowBlockLists.ts
33
44
```
34
45
35
46
### Description of Key Files and Directories
36
47
37
-
-**index.ts**: The main entry point of the solver application. It initializes and starts the listeners and fillers for different solvers.
48
+
-**solver/index.ts**: The main entry point of the solver application. It initializes and starts the listeners and fillers for different solvers.
38
49
39
50
-**logger.ts**: Contains the Logger class used for logging messages with various formats and levels.
40
51
52
+
-**NonceKeeperWallet.ts**: A class that extends ethers Wallet and prevents nonces race conditions when the solver needs to fill different intents (from different solutions) in the same network.
53
+
41
54
-**patch-bigint-buffer-warn.js**: A script to suppress specific warnings related to BigInt and Buffer, ensuring cleaner console output.
42
55
43
56
-**solvers/**: Contains implementations of different solvers and common utilities.
44
57
-**BaseListener.ts**: An abstract base class that provides common functionality for event listeners. It handles setting up contract connections and defines the interface for parsing event arguments.
45
-
-**eco/**: Implements the solver for the ECO domain.
-**filler.ts**: Processes ECO events and executes the required actions.
48
-
-**contracts/**: Contains contract ABI and type definitions for interacting with ECO contracts.
49
-
-**onChain/**: Implements the solver for on-chain events.
50
-
-**listener.ts**: Extends `BaseListener` to handle on-chain events.
51
-
-**filler.ts**: Processes on-chain events and executes the necessary actions.
52
-
-**contracts/**: Contains contract factories and types for on-chain contracts.
58
+
-**BaseFiller.ts**: An abstract base class that provides common functionality for fillers. It handles the solver's lifecycle `prepareIntent`, `fill`, and `settle`.
59
+
-**`prepareIntent`**: evaluate allow/block lists, balances, and run the defined rules to decide wether to fill or not an intent.
60
+
-**`fill`**: The actual filling.
61
+
-**`settle`**: The settlement step, can be avoided.
62
+
-**<eco|hyperlane7683>/**: Implements the solvers for the ECO and Hyperlane7683 domains.
63
+
-**listener.ts**: Extends `BaseListener` to handle domain-specific events.
64
+
-**filler.ts**: Extends `BaseFiller` to handle domain-specific intents.
65
+
-**contracts/**: Contains contract ABI and type definitions for interacting with domain-specific contracts.
53
66
-**index.ts**: Exports the solvers to be used in the main application.
54
67
55
-
-**types.ts**: Contains shared type definitions used across different solvers.
0 commit comments