Big rename#130
Conversation
There was a problem hiding this comment.
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-fungibleprotocol toerc-20-fixed-denomination - Renaming
collectionsprotocol toerc-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.
Bug: Inconsistent Method Signature Causes Interface MismatchThe |
There was a problem hiding this comment.
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.
| require_relative '../../lib/erc20_fixed_denomination_reader' | ||
| item = Erc20FixedDenominationReader.get_token_item(ethscription_id) |
There was a problem hiding this comment.
[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.
| class Erc20FixedDenominationReader | ||
| ERC20_FIXED_DENOMINATION_MANAGER_ADDRESS = '0x3300000000000000000000000000000000000002' |
There was a problem hiding this comment.
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.
| class Erc20FixedDenominationReader | |
| ERC20_FIXED_DENOMINATION_MANAGER_ADDRESS = '0x3300000000000000000000000000000000000002' | |
| require_relative 'predeploys' | |
| class Erc20FixedDenominationReader | |
| ERC20_FIXED_DENOMINATION_MANAGER_ADDRESS = Predeploys::ERC20_FIXED_DENOMINATION_MANAGER |
|
|
||
| # 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 |
There was a problem hiding this comment.
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.
| # 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. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Note
Migrate token and collection protocols to new canonical names and contracts, updating parsers, extractors, predeploys/genesis, readers, events, and tests accordingly.
fixed-fungible→erc-20-fixed-denomination;collections→erc-721-ethscriptions-collectionacross parsers (Erc20FixedDenominationParser,Erc721EthscriptionsCollectionParser) with strict validation and ABI tuple encoding.ProtocolExtractorandGenericProtocolExtractorto use new parsers, types, and calldata encoding.ERC20FixedDenomination,ERC20FixedDenominationManager,ERC721EthscriptionsCollection,ERC721EthscriptionsCollectionManagerwith corresponding events and logic.Predeploysaddresses,L2Genesisto set implementations and register protocols under new names.Ethscriptionsinterface/comments and handler interactions.Erc20FixedDenominationReaderand updateProtocolEventReaderto new event signatures.SysConfigtidy.Written by Cursor Bugbot for commit 7c5e457. This will update automatically on new commits. Configure here.