(assetCid: string, blockchainInfo, fromIndex: number, toIndex: number = null)
| 330 | } |
| 331 | |
| 332 | export async function log(assetCid: string, blockchainInfo, fromIndex: number, toIndex: number = null) { |
| 333 | const network = await blockchainInfo.provider.getNetwork(); |
| 334 | |
| 335 | if (toIndex <= fromIndex) { |
| 336 | const commitBlockNumbers = await getCommitBlockNumbers(assetCid, blockchainInfo); |
| 337 | const commitAmount: number = commitBlockNumbers.length; |
| 338 | toIndex = commitAmount; |
| 339 | } |
| 340 | |
| 341 | const commitEvents = await iterateCommitEvents(assetCid, blockchainInfo, fromIndex, toIndex); |
| 342 | const commits = await getCommits(commitEvents); |
| 343 | await showCommits(commits); |
| 344 | } |
| 345 | |
| 346 | export async function getCommit(assetCid: string, blockchainInfo, blockNumber: number) { |
| 347 | const filter = await blockchainInfo.contract.filters.Commit(null, assetCid); |
nothing calls this directly
no test coverage detected