Skip to content

Commit

Permalink
Add missing doc in tasks/prepareChunk.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-senechal committed Sep 24, 2024
1 parent d46387f commit 5855a38
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cli/src/tasks/prepareChunk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ async function prepareChunks(
return { chunks, preStores }
}

/**
* Check if the file requires update
* @param provider - the web3 provider
* @param filePath - the file path
* @param localFileContent - the local file content
* @param sc - the smart contract
* @returns true if the file requires update, false otherwise
*/
async function requiresUpdate(
provider: Web3Provider,
filePath: string,
Expand Down Expand Up @@ -141,6 +149,13 @@ async function requiresUpdate(
return localFileHash !== onChainFileHash
}

/**
* Filter out pre-stores that are already stored on the blockchain
* @param provider - the web3 provider
* @param scAddress - the smart contract address
* @param preStores - the pre-stores to filter
* @returns the pre-stores that are not stored on the blockchain
*/
async function filterUselessPreStores(
provider: Web3Provider,
scAddress: string,
Expand Down

0 comments on commit 5855a38

Please sign in to comment.