We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf59dab commit 4792f59Copy full SHA for 4792f59
services/decoder/protocols/uniswap-v2/uniswap-v2.test.ts
@@ -78,4 +78,23 @@ describe("uniswap-v2", () => {
78
}
79
expect(event.tokens?.length).toEqual(2);
80
});
81
+
82
+ test("eth-mainnet:PairCreated", async () => {
83
+ const res = await request(app)
84
+ .post("/api/v1/tx/decode")
85
+ .set({
86
+ "x-covalent-api-key": process.env.TEST_COVALENT_API_KEY,
87
+ })
88
+ .send({
89
+ network: "eth-mainnet",
90
+ tx_hash:
91
+ "0x9584cdf7d99a22e18843cf26c484018bfb11ab4ce4f2d898ec69075ed8e3c8dc",
92
+ });
93
+ const { events } = res.body as { events: EventType[] };
94
+ const event = events.find(({ name }) => name === "PairCreated");
95
+ if (!event) {
96
+ throw Error("Event not found");
97
+ }
98
+ expect(event.tokens?.length).toEqual(2);
99
100
0 commit comments