From 0ab4d478a4930a2044b68280ca4e6cd69f63920a Mon Sep 17 00:00:00 2001 From: Dhruv Kelawala Date: Tue, 11 Oct 2022 00:28:18 +0530 Subject: [PATCH] fix: use BigNumberish type for classHash --- src/types/lib.ts | 2 +- src/types/signer.ts | 2 +- src/utils/hash.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/types/lib.ts b/src/types/lib.ts index f61c00c0e..b523919fd 100644 --- a/src/types/lib.ts +++ b/src/types/lib.ts @@ -21,7 +21,7 @@ export type DeployContractPayload = { export type DeclareContractPayload = { contract: CompiledContract | string; - classHash: string; // Once the classHash is included in CompiledContract, this can be removedf + classHash: BigNumberish; // Once the classHash is included in CompiledContract, this can be removedf }; export type DeclareContractTransaction = { diff --git a/src/types/signer.ts b/src/types/signer.ts index bece1d71a..db674c449 100644 --- a/src/types/signer.ts +++ b/src/types/signer.ts @@ -9,7 +9,7 @@ export interface InvocationsSignerDetails extends Required { export interface DeclareSignerDetails { // contractClass: ContractClass, // Should be used once class hash is present in ContractClass - classHash: string; + classHash: BigNumberish; senderAddress: BigNumberish; chainId: StarknetChainId; maxFee: BigNumberish; diff --git a/src/utils/hash.ts b/src/utils/hash.ts index 3bec3bb93..42f273413 100644 --- a/src/utils/hash.ts +++ b/src/utils/hash.ts @@ -149,7 +149,7 @@ export function calculateDeployTransactionHash( export function calculateDeclareTransactionHash( // contractClass: ContractClass, // Should be used once class hash is present in ContractClass - classHash: string, + classHash: BigNumberish, senderAddress: BigNumberish, version: BigNumberish, maxFee: BigNumberish,