Skip to content

Commit

Permalink
improve minimal fee
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Nov 21, 2024
1 parent f57178e commit 1fe1018
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bearbyWallet/BearbyAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class BearbyAccount implements Provider {
}

public async deploySC(params: DeploySCParams): Promise<SmartContract> {
const minimalFee = await this.minimalFee();
const fee = Number(params.fee ?? (await this.minimalFee()));
const totalCost =
StorageCost.smartContract(params.byteCode.length) + params.coins;

Expand All @@ -256,7 +256,7 @@ export class BearbyAccount implements Provider {
maxCoins: Number(totalCost),
maxGas: Number(params.maxGas || MAX_GAS_DEPLOYMENT),
coins: Number(params.coins),
fee: Number(minimalFee),
fee: fee,
gasPrice: 10000n,
contractDataBase64: uint8ArrayToBase64(params.byteCode),
deployerBase64: uint8ArrayToBase64(DEPLOYER_BYTECODE),
Expand Down

0 comments on commit 1fe1018

Please sign in to comment.