Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove SC param from file init costs #235

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions cli/src/lib/website/filesInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export async function sendFilesInits(
const operations: Operation[] = []

for (const batch of batches) {
const coins = await batch.batchCost(sc)
const coins = await batch.batchCost()
const gas = await batch.estimateGas(sc)
const args = batch.serialize()

Expand Down Expand Up @@ -229,7 +229,6 @@ export async function prepareCost(
}

export async function filesInitCost(
_sc: SmartContract,
files: FileInit[],
filesToDelete: FileDelete[],
metadatas: Metadata[],
Expand Down Expand Up @@ -271,7 +270,6 @@ async function estimatePrepareGas(
metadatasToDelete: Metadata[]
): Promise<bigint> {
const coins = await filesInitCost(
sc,
files,
filesToDelete,
metadatas,
Expand Down Expand Up @@ -327,9 +325,8 @@ class Batch {
.serialize()
}

batchCost(sc: SmartContract): Promise<bigint> {
batchCost(): Promise<bigint> {
return filesInitCost(
sc,
this.fileInits,
this.fileDeletes,
this.metadatas,
Expand Down
Loading