Skip to content

Commit aada304

Browse files
pivilartisantphoebe
andauthored
remove SC param from file init costs (#235)
Co-authored-by: phoebe <phoebe.lartisant@proton.me>
1 parent a05b530 commit aada304

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cli/src/lib/website/filesInit.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export async function sendFilesInits(
121121
const operations: Operation[] = []
122122

123123
for (const batch of batches) {
124-
const coins = await batch.batchCost(sc)
124+
const coins = await batch.batchCost()
125125
const gas = await batch.estimateGas(sc)
126126
const args = batch.serialize()
127127

@@ -229,7 +229,6 @@ export async function prepareCost(
229229
}
230230

231231
export async function filesInitCost(
232-
_sc: SmartContract,
233232
files: FileInit[],
234233
filesToDelete: FileDelete[],
235234
metadatas: Metadata[],
@@ -271,7 +270,6 @@ async function estimatePrepareGas(
271270
metadatasToDelete: Metadata[]
272271
): Promise<bigint> {
273272
const coins = await filesInitCost(
274-
sc,
275273
files,
276274
filesToDelete,
277275
metadatas,
@@ -327,9 +325,8 @@ class Batch {
327325
.serialize()
328326
}
329327

330-
batchCost(sc: SmartContract): Promise<bigint> {
328+
batchCost(): Promise<bigint> {
331329
return filesInitCost(
332-
sc,
333330
this.fileInits,
334331
this.fileDeletes,
335332
this.metadatas,

0 commit comments

Comments
 (0)