Skip to content

Big rename and reorg#126

Merged
RogerPodacter merged 3 commits into
evm-backend-demofrom
recator
Oct 21, 2025
Merged

Big rename and reorg#126
RogerPodacter merged 3 commits into
evm-backend-demofrom
recator

Conversation

@RogerPodacter

@RogerPodacter RogerPodacter commented Oct 21, 2025

Copy link
Copy Markdown
Member

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.

  • Solidity Contracts:
    • Ethscriptions:
      • Replace transactionHash with ethscriptionId across storage (ethscriptions mapping), events (EthscriptionCreated, EthscriptionTransferred, protocol handler events), and APIs (createEthscription, transfers, exists, ownerOf, getTokenId).
      • Swap tokenIdToTransactionHash for tokenIdToEthscriptionId.
      • Add helpers: _getEthscriptionOrRevert(...), getEthscription(uint256), getEthscriptionContent(uint256), getEthscriptionWithContent(uint256), getEthscriptionId(uint256).
      • Update tokenURI/renderer calls to pass ethscriptionId and adjust attributes label to "Ethscription ID".
    • Genesis/Script:
      • GenesisEthscriptions and L2Genesis.s.sol updated to use ethscriptionId; pending events store IDs.
      • TestTokenUri.s.sol calls updated to new param.
    • Protocols:
      • IProtocolHandler.onTransfer(bytes32) param renamed to ethscriptionId.
      • TokenManager: rename fields/mappings/events to deployEthscriptionId; update ops (op_deploy, op_mint, onTransfer) and getters accordingly.
      • CollectionsManager: CollectionState.createTxHash -> createEthscriptionId; event ProtocolHandlerSuccess topic uses ethscriptionId; onTransfer signature updated.
    • Prover:
      • EthscriptionsProver struct/event fields renamed to ethscriptionId; queue/flush paths use IDs.
    • Libraries:
      • EthscriptionsRendererLib now labels attribute as "Ethscription ID" and accepts ethscriptionId in builders.
  • Ruby Tooling:
    • Update StorageReader ABI and calls to accept ethscriptionId for getEthscription* and ownerOf.
    • EventDecoder comments/decoding align with ethscriptionId terminology.
    • BlockValidator: clarify genesis IDs wording; minor logic unchanged.
    • EthscriptionTransaction: comment clarifies first param is ethscriptionId (L1 tx hash).
  • Tests/Fixtures:
    • Update all tests and scripts to use ethscriptionId in CreateEthscriptionParams and adjusted expectations (events, getters, renderer attributes).

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

@RogerPodacter RogerPodacter requested a review from Copilot October 21, 2025 17:35

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 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/txHash to ethscriptionId throughout contracts and Ruby code
  • Updated struct field names (e.g., deployTxHashdeployEthscriptionId, createTxHashcreateEthscriptionId)
  • 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.

@RogerPodacter RogerPodacter merged commit b13cd10 into evm-backend-demo Oct 21, 2025
1 of 2 checks passed
@RogerPodacter RogerPodacter deleted the recator branch October 21, 2025 17:40
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