Skip to content

Commit

Permalink
fix: estimateAccountDeployFee set nonce to constant 0
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Dec 14, 2022
1 parent a127cfa commit 2110ef0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/account/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ export class Account extends Provider implements AccountInterface {
constructorCalldata = [],
contractAddress: providedContractAddress,
}: DeployAccountContractPayload,
{ blockIdentifier, nonce: providedNonce }: EstimateFeeDetails = {}
{ blockIdentifier }: EstimateFeeDetails = {}
): Promise<EstimateFee> {
const nonce = toBN(providedNonce ?? (await this.getNonce()));
const nonce = '0x0';
const version = toBN(feeTransactionVersion);
const chainId = await this.getChainId();
const contractAddress =
Expand Down
6 changes: 4 additions & 2 deletions src/account/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ export abstract class AccountInterface extends ProviderInterface {
/**
* Estimate Fee for executing a DEPLOY_ACCOUNT transaction on starknet
*
* @param contractPayload the payload object containing:
* @param contractPayload -
* - contract - the compiled contract to be deployed
* - classHash - the class hash of the compiled contract. This can be obtained by using starknet-cli.
*
* @param estimateFeeDetails -
* - optional blockIdentifier
* - constant nonce = 0
* @returns response from estimate_fee
*/
public abstract estimateAccountDeployFee(
Expand Down

0 comments on commit 2110ef0

Please sign in to comment.