Skip to content

Big rename#130

Merged
RogerPodacter merged 3 commits into
evm-backend-demofrom
rename
Oct 23, 2025
Merged

Big rename#130
RogerPodacter merged 3 commits into
evm-backend-demofrom
rename

Conversation

@RogerPodacter

@RogerPodacter RogerPodacter commented Oct 23, 2025

Copy link
Copy Markdown
Member

Note

Migrate token and collection protocols to new canonical names and contracts, updating parsers, extractors, predeploys/genesis, readers, events, and tests accordingly.

  • Protocols/Parsing:
    • Rename fixed-fungibleerc-20-fixed-denomination; collectionserc-721-ethscriptions-collection across parsers (Erc20FixedDenominationParser, Erc721EthscriptionsCollectionParser) with strict validation and ABI tuple encoding.
    • Update ProtocolExtractor and GenericProtocolExtractor to use new parsers, types, and calldata encoding.
  • Contracts/Genesis/Predeploys:
    • Add/rename contracts: ERC20FixedDenomination, ERC20FixedDenominationManager, ERC721EthscriptionsCollection, ERC721EthscriptionsCollectionManager with corresponding events and logic.
    • Update Predeploys addresses, L2Genesis to set implementations and register protocols under new names.
    • Adjust Ethscriptions interface/comments and handler interactions.
  • Infra/Readers/Events:
    • Replace reader utilities with Erc20FixedDenominationReader and update ProtocolEventReader to new event signatures.
    • Minor importer cleanup and SysConfig tidy.
  • Tests:
    • Comprehensive test suite updates to new protocol names/contracts and behaviors across unit/integration tests.

Written by Cursor Bugbot for commit 7c5e457. This will update automatically on new commits. Configure here.

@RogerPodacter RogerPodacter requested a review from Copilot October 23, 2025 14:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements a comprehensive rename of protocol identifiers and related classes to use more descriptive, specific naming conventions. The primary changes are:

  • Renaming fixed-fungible protocol to erc-20-fixed-denomination
  • Renaming collections protocol to erc-721-ethscriptions-collection
  • Renaming associated classes, constants, and contract names to match the new protocol names

Reviewed Changes

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

Show a summary per file
File Description
spec/models/protocol_extractor_spec.rb Updates test expectations to use new protocol identifiers
spec/models/generic_protocol_extractor_*.rb Updates test data to use new collection protocol name
spec/models/ethscription_transaction_builder_spec.rb Updates parser class references and expected output
spec/models/erc721_ethscriptions_collection_parser_spec.rb Updates all test JSON fixtures and class references
spec/models/erc20_fixed_denomination_parser_spec.rb Renames class under test and updates protocol name in expectations
spec/integration/*.rb Updates protocol identifiers, class names, and reader references
lib/sys_config.rb Removes unused constant definition
lib/protocol_event_reader.rb Adds new event names while maintaining backward compatibility with legacy names
lib/erc20_fixed_denomination_reader.rb Renames class and updates protocol identifier
contracts/test/*.sol Updates contract references, class names, and test assertions
contracts/src/*.sol Renames contracts and updates protocol identifiers
app/models/*.rb Updates extractor class names and protocol identifiers
Comments suppressed due to low confidence (1)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lib/sys_config.rb
Comment thread app/models/erc721_ethscriptions_collection_parser.rb Outdated
@cursor

cursor Bot commented Oct 23, 2025

Copy link
Copy Markdown

Bug: Inconsistent Method Signature Causes Interface Mismatch

The op_sync_ownership function's signature is inconsistent with other op_* methods in the contract. It no longer includes the bytes32 txHash parameter, which all other protocol operations still expect. This mismatch could lead to runtime errors when the Ethscriptions contract attempts to call it, as the method signatures won't align with the expected IProtocolHandler interface.

Fix in Cursor Fix in Web

@RogerPodacter RogerPodacter requested a review from Copilot October 23, 2025 15:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 37 out of 37 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread spec/integration/token_protocol_e2e_spec.rb Outdated
Comment on lines +415 to +416
require_relative '../../lib/erc20_fixed_denomination_reader'
item = Erc20FixedDenominationReader.get_token_item(ethscription_id)

Copilot AI Oct 23, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] The require_relative statement is redundant if the file is already loaded elsewhere in the application. Consider removing it unless this file is explicitly intended to be run in isolation.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +2
class Erc20FixedDenominationReader
ERC20_FIXED_DENOMINATION_MANAGER_ADDRESS = '0x3300000000000000000000000000000000000002'

Copilot AI Oct 23, 2025

Copy link

Choose a reason for hiding this comment

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

The constant ERC20_FIXED_DENOMINATION_MANAGER_ADDRESS is hardcoded but should reference Predeploys::ERC20_FIXED_DENOMINATION_MANAGER from the contracts if available in Ruby context. This ensures consistency with contract predeploy addresses and reduces duplication.

Suggested change
class Erc20FixedDenominationReader
ERC20_FIXED_DENOMINATION_MANAGER_ADDRESS = '0x3300000000000000000000000000000000000002'
require_relative 'predeploys'
class Erc20FixedDenominationReader
ERC20_FIXED_DENOMINATION_MANAGER_ADDRESS = Predeploys::ERC20_FIXED_DENOMINATION_MANAGER

Copilot uses AI. Check for mistakes.

# Exact regex patterns for valid formats
# Protocol must be "erc-20" or "fixed-fungible" (case-sensitive)
# Protocol must be "erc-20" (legacy inscription) or the canonical identifier

Copilot AI Oct 23, 2025

Copy link

Choose a reason for hiding this comment

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

Add a comment explaining that 'erc-20' is supported as a legacy inscription format for backward compatibility, while 'erc-20-fixed-denomination' is the canonical protocol name. This will help future maintainers understand why both patterns are accepted.

Suggested change
# Protocol must be "erc-20" (legacy inscription) or the canonical identifier
# Protocol must be "erc-20" (legacy inscription) or the canonical identifier
# 'erc-20' is supported as a legacy inscription format for backward compatibility,
# while 'erc-20-fixed-denomination' is the canonical protocol name. Both are accepted.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@RogerPodacter RogerPodacter merged commit 8992c1d into evm-backend-demo Oct 23, 2025
2 checks passed
@RogerPodacter RogerPodacter deleted the rename branch October 23, 2025 15:17
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.

2 participants