Skip to content

Commit

Permalink
chore(docs): update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkelawala committed Oct 10, 2022
1 parent bf7abca commit a1f3b38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
19 changes: 14 additions & 5 deletions src/account/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,47 @@ 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[],
estimateFeeDetails?: EstimateFeeDetails
): Promise<EstimateFeeResponse>;

/**
* 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<EstimateFeeResponse>;

/**
* 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<EstimateFeeResponse>;

/**
Expand Down
3 changes: 1 addition & 2 deletions src/types/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit a1f3b38

Please sign in to comment.