Skip to content

Conversation

peterjah
Copy link
Contributor

No description provided.

@peterjah peterjah requested a review from Copilot June 11, 2025 13:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds an upgrade script to the smart contract along with minor improvements and formatting changes in related files. Key changes include:

  • A new upgrade script (upgrade.ts) that calls the upgradeSC method on the smart contract.
  • Formatting and style updates in Metadata.ts and deweb-interface.ts.
  • Addition of an "upgrade" script command in package.json and a no-console rule override in the ESLint configuration.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
smart-contract/src/upgrade.ts Added upgrade script to call the upgradeSC method
smart-contract/src/e2e/helpers/serializable/Metadata.ts Reformatted constructor for brevity
smart-contract/package.json Added upgrade script command
smart-contract/assembly/contracts/deweb-interface.ts Adjusted assertions formatting and unused parameter naming
smart-contract/assembly/tests/deweb-interface/helpers/delete-file.ts Removed an extra newline
smart-contract/.eslintrc.cjs Overrode ESLint no-console rule for src files

assert(hashLocation.length == 32, 'Invalid filpath sha256 hash. should be 32 bytes');
assert(
hashLocation.length == 32,
'Invalid filpath sha256 hash. should be 32 bytes',
Copy link

Copilot AI Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message contains a spelling mistake ('filpath' should be 'filepath'). Correcting this will improve clarity.

Suggested change
'Invalid filpath sha256 hash. should be 32 bytes',
'Invalid filepath sha256 hash. should be 32 bytes',

Copilot uses AI. Check for mistakes.

assert(hashLocation.length == 32, 'Invalid filpath sha256 hash. should be 32 bytes');
assert(
hashLocation.length == 32,
'Invalid filpath sha256 hash. should be 32 bytes',
Copy link

Copilot AI Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message contains a typo ('filpath' should be 'filepath'). A correction here will enhance readability.

Suggested change
'Invalid filpath sha256 hash. should be 32 bytes',
'Invalid filepath sha256 hash. should be 32 bytes',

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant