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
The parser returns a `PumpFunTransaction` object (or an array of `PumpFunTransaction` objects if `parseMultiple` is called):
50
50
51
-
### PumpFun Transaction Structure
51
+
####PumpFun Transaction Structure
52
52
The `PumpFunTransaction` object shows the different operations that occurred in the transaction. These operations are gotten from the events emitted during the transaction execution and are represented by the `PumpFunAction` interface as follows:
53
53
```typescript
54
54
interfacePumpFunTransaction {
@@ -57,7 +57,7 @@ interface PumpFunTransaction {
57
57
}
58
58
```
59
59
60
-
### PumpFun Action Structure
60
+
####PumpFun Action Structure
61
61
The `PumpFunAction` interface contains the three major actions that can occur in a PumpFun transaction (`create`, `complete`, `trade`), with the `info` field containing the relevant information for each action. The info field is of type `TradeInfo`, `CreateInfo`, or `CompleteInfo` depending on the action.
62
62
63
63
```typescript
@@ -94,8 +94,10 @@ type CompleteInfo = {
94
94
timestamp:bigint;
95
95
};
96
96
```
97
+
97
98
> NB: The `CompleteInfo` event might return unexpected results due to issues with parsing variable length string fields (`name`, `symbol`, `uri`).
98
99
100
+
99
101
### ▶️ Raydium Parser [Comming soon]
100
102
101
103
### ▶️ Jupiter Parser [Coming soon]
@@ -133,8 +135,10 @@ class CustomParser extends BaseParser<CustomTransaction> {
133
135
}
134
136
}
135
137
```
138
+
136
139
> NB: For anchor specific parsers that rely on events, you can use the `anchorLogScanner` function present in the `src/core/utils` file to get program events from the transaction.
137
140
141
+
138
142
## 🤝 Contributing
139
143
140
144
Here's how you can contribute to the library:
@@ -160,7 +164,8 @@ You can check the parser directory for more information on how to implement your
160
164
- Update the README.md if your changes affect the usage of the parser.
161
165
- Submit a pull request with your changes, explaining the modifications and their purpose.
162
166
163
-
> NB:For all contributions, please ensure your code passes all existing tests and include additional tests for the new parser. I also recommend using the `anchorLogScanner` function present in the `src/core/utils` file to get anchor program events from the transaction to avoid having to install anchor library (trying to make this library as lightweight as possible).
167
+
168
+
> NB: For all contributions, please ensure your code passes all existing tests and include additional tests for the new parser. I also recommend using the `anchorLogScanner` function present in the `src/core/utils` file to get anchor program events from the transaction to avoid having to install anchor library (trying to make this library as lightweight as possible).
0 commit comments