Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
fix: declare StorageKey as HexNumber type
Browse files Browse the repository at this point in the history
  • Loading branch information
keroro520 committed Aug 29, 2022
1 parent 198d713 commit 5e989c8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion packages/api-server/src/methods/modules/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class Eth {
]);
this.getStorageAt = middleware(this.getStorageAt.bind(this), 3, [
validators.address,
validators.storageKey,
validators.hexNumber,
validators.blockParameter,
]);
this.getTransactionCount = middleware(
Expand Down
15 changes: 0 additions & 15 deletions packages/api-server/src/methods/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ export const validators = {
return verifyHexNumber(params[index], index);
},

storageKey(params: any[], index: number) {
return verifyStorageKey(params[index], index);
},

/**
* Hex number | "latest" | "earliest" | "pending"
* @param params
Expand Down Expand Up @@ -427,17 +423,6 @@ export function verifyEstimateGasCallObject(
return undefined;
}

export function verifyStorageKey(
key: string,
index: number
): InvalidParamsError | undefined {
const err = verifyHexString(key, index);
if (err) {
return err.padContext("storageKey");
}
return undefined;
}

export function verifyFilterTopicString(
topic: any,
index: number
Expand Down

0 comments on commit 5e989c8

Please sign in to comment.