Big rename and reorg#126
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR performs a comprehensive rename throughout the codebase, replacing references to "transaction hash" or "txHash" with the more semantically accurate "ethscription ID" to better reflect that this identifier represents an ethscription's unique L1 transaction hash identifier.
Key changes:
- Renamed parameter and variable names from
transactionHash/txHashtoethscriptionIdthroughout contracts and Ruby code - Updated struct field names (e.g.,
deployTxHash→deployEthscriptionId,createTxHash→createEthscriptionId) - Updated comments and documentation to reflect the terminology change
- Simplified transfer ID handling logic in test helper
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| spec/support/ethscriptions_test_helper.rb | Simplified transfer ID handling and added support for transfer_with_previous_owner operation |
| lib/storage_reader.rb | Renamed ABI parameter from transactionHash/txHash to ethscriptionId |
| lib/event_decoder.rb | Updated event comment to reflect parameter rename |
| lib/block_validator.rb | Clarified comment about genesis ethscription IDs |
| contracts/test/*.sol | Updated test files to use ethscriptionId parameter name |
| contracts/src/libraries/EthscriptionsRendererLib.sol | Renamed parameter and updated trait type from "Transaction Hash" to "Ethscription ID" |
| contracts/src/interfaces/IProtocolHandler.sol | Renamed interface parameter to ethscriptionId |
| contracts/src/TokenManager.sol | Renamed struct fields and function parameters throughout |
| contracts/src/EthscriptionsProver.sol | Renamed struct field and parameters to ethscriptionId |
| contracts/src/EthscriptionsERC20.sol | Renamed state variable to deployEthscriptionId |
| contracts/src/Ethscriptions.sol | Major refactoring: renamed all instances, replaced requireExists modifier with helper functions, added overloaded getter methods |
| contracts/src/CollectionsManager.sol | Renamed struct field to createEthscriptionId |
| contracts/script/*.s.sol | Updated script parameter names to ethscriptionId |
| app/models/ethscription_transaction.rb | Updated comment to reflect parameter rename |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
System-wide rename from transactionHash to ethscriptionId (L1 tx hash), updating events, mappings, interfaces, and tooling, plus new ID/tokenId accessors and helper APIs.
transactionHashwithethscriptionIdacross storage (ethscriptionsmapping), events (EthscriptionCreated,EthscriptionTransferred, protocol handler events), and APIs (createEthscription, transfers,exists,ownerOf,getTokenId).tokenIdToTransactionHashfortokenIdToEthscriptionId._getEthscriptionOrRevert(...),getEthscription(uint256),getEthscriptionContent(uint256),getEthscriptionWithContent(uint256),getEthscriptionId(uint256).tokenURI/renderer calls to passethscriptionIdand adjust attributes label to "Ethscription ID".GenesisEthscriptionsandL2Genesis.s.solupdated to useethscriptionId; pending events store IDs.TestTokenUri.s.solcalls updated to new param.IProtocolHandler.onTransfer(bytes32)param renamed toethscriptionId.TokenManager: rename fields/mappings/events todeployEthscriptionId; update ops (op_deploy,op_mint,onTransfer) and getters accordingly.CollectionsManager:CollectionState.createTxHash->createEthscriptionId; eventProtocolHandlerSuccesstopic usesethscriptionId;onTransfersignature updated.EthscriptionsProverstruct/event fields renamed toethscriptionId; queue/flush paths use IDs.EthscriptionsRendererLibnow labels attribute as "Ethscription ID" and acceptsethscriptionIdin builders.StorageReaderABI and calls to acceptethscriptionIdforgetEthscription*andownerOf.EventDecodercomments/decoding align withethscriptionIdterminology.BlockValidator: clarify genesis IDs wording; minor logic unchanged.EthscriptionTransaction: comment clarifies first param isethscriptionId (L1 tx hash).ethscriptionIdinCreateEthscriptionParamsand adjusted expectations (events, getters, renderer attributes).Written by Cursor Bugbot for commit 3260421. This will update automatically on new commits. Configure here.