From a1f3b38939dafd2fd08e93e468858c942f26bd2d Mon Sep 17 00:00:00 2001 From: Dhruv Kelawala Date: Mon, 10 Oct 2022 16:08:03 +0530 Subject: [PATCH] chore(docs): update documentation --- src/account/interface.ts | 19 ++++++++++++++----- src/types/lib.ts | 3 +-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/account/interface.ts b/src/account/interface.ts index 6985ed002..6f7f65a7e 100644 --- a/src/account/interface.ts +++ b/src/account/interface.ts @@ -22,14 +22,14 @@ export abstract class AccountInterface extends ProviderInterface { /** * @deprecated Use estimateInvokeFee or estimateDeclareFee instead - * Estimate Fee for a method on starknet + * Estimate Fee for executing an INVOKE transaction on starknet * * @param calls the invocation object containing: * - contractAddress - the address of the contract * - entrypoint - the entrypoint of the contract * - calldata - (defaults to []) the calldata * - * @returns response from addTransaction + * @returns response from estimate_fee */ public abstract estimateFee( calls: Call | Call[], @@ -37,23 +37,32 @@ export abstract class AccountInterface extends ProviderInterface { ): Promise; /** - * Estimate Fee for a method on starknet + * Estimate Fee for executing an INVOKE transaction on starknet * * @param calls the invocation object containing: * - contractAddress - the address of the contract * - entrypoint - the entrypoint of the contract * - calldata - (defaults to []) the calldata * - * @returns response from addTransaction + * @returns response from estimate_fee */ public abstract estimateInvokeFee( calls: Call | Call[], estimateFeeDetails?: EstimateFeeDetails ): Promise; + /** + * Estimate Fee for executing a DECLARE transaction on starknet + * + * @param contractPayload the payload object containing: + * - contract - the compiled contract to be declared + * - classHash - the class hash of the compiled contract. This can be obtained by using starknet-cli. + * + * @returns response from estimate_fee + */ public abstract estimateDeclareFee( contractPayload: DeclareContractPayload, - transactionsDetail?: EstimateFeeDetails + estimateFeeDetails?: EstimateFeeDetails ): Promise; /** diff --git a/src/types/lib.ts b/src/types/lib.ts index 64d300610..f61c00c0e 100644 --- a/src/types/lib.ts +++ b/src/types/lib.ts @@ -20,9 +20,8 @@ export type DeployContractPayload = { }; export type DeclareContractPayload = { - // The line is commented until we have Class Hash in the compiled contract contract: CompiledContract | string; - classHash: string; + classHash: string; // Once the classHash is included in CompiledContract, this can be removedf }; export type DeclareContractTransaction = {