Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Oct 9, 2024
1 parent a239036 commit 8ae80a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/bytes.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import type { BytesLike } from '@metamask/utils';
type HexString = `0x${string}`;

import {
createBytes as toBytes,
createHex as toHex,
concatBytes as concat,
} from '@metamask/utils';
import { createBytes as toBytes, createHex as toHex, concatBytes as concat } from '@metamask/utils';

function compare(a: BytesLike, b: BytesLike): number {
const diff = BigInt(toHex(a)) - BigInt(toHex(b));
Expand Down
3 changes: 1 addition & 2 deletions src/hashes.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { encode } from '@metamask/abi-utils';
import { keccak256 as _keccak256 } from "ethereum-cryptography/keccak.js";
import { keccak256 as _keccak256 } from 'ethereum-cryptography/keccak.js';
import { BytesLike, HexString, toHex, toBytes, concat, compare } from './bytes';

export type LeafHash<T> = (leaf: T) => HexString;
export type NodeHash = (left: BytesLike, right: BytesLike) => HexString;


export function keccak256(input: BytesLike): HexString {
return toHex(_keccak256(toBytes(input)));
}
Expand Down

0 comments on commit 8ae80a2

Please sign in to comment.