Skip to content

Commit

Permalink
Update estimateUploadBatchesGas call to use prover and address
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-senechal committed Jan 13, 2025
1 parent 827c506 commit 420456b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cli/src/tasks/estimations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { ListrTask } from 'listr2'

import { Batch } from '../lib/batcher'
import { BatchStatus, UploadBatch } from '../lib/uploadManager'
import { formatBytes } from '../lib/utils/utils'
import { computeChunkCost } from '../lib/website/chunk'
import { estimateUploadBatchesGas } from '../lib/website/uploadChunk'

import { UploadCtx } from './tasks'
import { formatBytes } from '../lib/utils/utils'

/**
* Create a task to estimate the cost of each batch
Expand Down Expand Up @@ -82,7 +82,11 @@ export function estimateGasTask(): ListrTask {
gas: 0n,
}))

ctx.uploadBatches = await estimateUploadBatchesGas(ctx.sc, batches)
ctx.uploadBatches = await estimateUploadBatchesGas(
ctx.provider,
ctx.sc.address,
batches
)

const totalGas = ctx.uploadBatches.reduce(
(sum: bigint, batch: UploadBatch) => sum + batch.gas,
Expand Down

0 comments on commit 420456b

Please sign in to comment.