forked from kkrt-labs/kakarot-rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: check
fromAddress
in starknet event (kkrt-labs#1291)
* dev: check `fromAddress` in starknet event * add comment * trunk format * update deno tests * fix: address comparison --------- Co-authored-by: Eugenio Paluello <[email protected]>
- Loading branch information
Showing
2 changed files
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { assertEquals } from "https://deno.land/[email protected]/assert/mod.ts"; | ||
import { fromJsonRpcLog, IGNORED_KEYS, JsonRpcLog, toEthLog } from "./log.ts"; | ||
import { bigIntToHex, Event, JsonRpcTx } from "../deps.ts"; | ||
import { KAKAROT_ADDRESS } from "../constants.ts"; | ||
|
||
// Mock for hexToBytes | ||
const mockHexToBytes = (hex: string): Uint8Array => { | ||
|
@@ -101,7 +102,7 @@ Deno.test("toEthLog with valid input", () => { | |
|
||
const event: Event = { | ||
index: 1, | ||
fromAddress: "0x123456", | ||
fromAddress: KAKAROT_ADDRESS as `0x${string}`, | ||
keys: ["0x1234", "0x5678", "0x9abc", "0xdef0", "0x1111"], | ||
data: ["0x01", "0x02", "0x03"], | ||
}; | ||
|
@@ -233,7 +234,7 @@ Deno.test("toEthLog with empty event data", () => { | |
// No data in the event. | ||
const event: Event = { | ||
index: 1, | ||
fromAddress: "0x123456", | ||
fromAddress: KAKAROT_ADDRESS as `0x${string}`, | ||
keys: ["0x1234", "0x5678", "0x9abc", "0xdef0", "0x1111"], | ||
data: [], | ||
}; | ||
|
@@ -286,7 +287,7 @@ Deno.test("toEthLog with pending block", () => { | |
|
||
const event: Event = { | ||
index: 1, | ||
fromAddress: "0x123456", | ||
fromAddress: KAKAROT_ADDRESS as `0x${string}`, | ||
keys: ["0x1234", "0x5678", "0x9abc", "0xdef0", "0x1111"], | ||
data: ["0x01", "0x02", "0x03"], | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters