diff --git a/.github/workflows/erc-registry-indexer.yml b/.github/workflows/erc-registry-indexer.yml index 3f9be4474..c0afd8f96 100644 --- a/.github/workflows/erc-registry-indexer.yml +++ b/.github/workflows/erc-registry-indexer.yml @@ -113,9 +113,17 @@ jobs: NEW_ERC721_RECORDS=$(jq '. | length' erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-721.json) fi + # Determine the new amount of ERC-1155 records + if [ -f backup/erc-1155.json ]; then + NEW_ERC1155_RECORDS=$(jq -s '.[1] - .[0] | length' backup/erc-1155.json erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-1155.json) + else + NEW_ERC1155_RECORDS=$(jq '. | length' erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/erc-1155.json) + fi + # Export the results to GitHub environment variables echo "NEW_ERC20_RECORDS=${NEW_ERC20_RECORDS}" >> $GITHUB_ENV echo "NEW_ERC721_RECORDS=${NEW_ERC721_RECORDS}" >> $GITHUB_ENV + echo "NEW_ERC1155_RECORDS=${NEW_ERC1155_RECORDS}" >> $GITHUB_ENV - name: Delete backup registry folder run: | @@ -144,22 +152,23 @@ jobs: uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: branch: ERC-Registry-Periodical-Update/${{ github.run_id }} - commit-message: 'chore: update ERC Registry with latest ERC-20 and ERC-721 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' + commit-message: 'chore: update ERC Registry with latest ERC-20, ERC-721, and ERC-1155 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' committer: ${{ steps.gpg_importer.outputs.name }} <${{ steps.gpg_importer.outputs.email }}> author: ${{ steps.gpg_importer.outputs.name }} <${{ steps.gpg_importer.outputs.email }}> token: ${{ secrets.GH_ACCESS_TOKEN }} delete-branch: true signoff: true - title: 'chore: update ERC Registry with latest ERC-20 and ERC-721 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' + title: 'chore: update ERC Registry with latest ERC-20, ERC-721, and ERC-1155 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' body: > **Description**: - This PR updates the ERC Registry to include the most recent ERC-20 and ERC-721 tokens. + This PR updates the ERC Registry to include the most recent ERC-20, ERC-721, and ERC-1155 tokens. **Registry Update Summary**: - **Hedera Network**: ${{ github.event.inputs.HEDERA_NETWORK }} - **New ERC-20 Records Added**: ${{ env.NEW_ERC20_RECORDS }} - **New ERC-721 Records Added**: ${{ env.NEW_ERC721_RECORDS }} + - **New ERC-1155 Records Added**: ${{ env.NEW_ERC1155_RECORDS }} - **Indexing Duration**: ${{ env.INDEXING_DURATION }} - **Last Indexed Time**: ${{ env.CURRENT_DATE }} labels: 'internal' @@ -186,22 +195,23 @@ jobs: uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6 with: branch: ERC-Registry-Periodical-Update/${{ github.run_id }} - commit-message: 'chore: update ERC Registry with latest ERC-20 and ERC-721 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' + commit-message: 'chore: update ERC Registry with latest ERC-20, ERC-721, and ERC-1155 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' committer: ${{ steps.gpg_importer.outputs.name }} <${{ steps.gpg_importer.outputs.email }}> author: ${{ steps.gpg_importer.outputs.name }} <${{ steps.gpg_importer.outputs.email }}> token: ${{ secrets.GH_ACCESS_TOKEN_MIRROR_NODE_EXPLORER }} delete-branch: true signoff: true - title: 'chore: update ERC Registry with latest ERC-20 and ERC-721 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' + title: 'chore: update ERC Registry with latest ERC-20, ERC-721, and ERC-1155 tokens on Hedera ${{github.event.inputs.HEDERA_NETWORK}}' body: > **Description**: - This PR updates the ERC Registry to include the most recent ERC-20 and ERC-721 tokens. + This PR updates the ERC Registry to include the most recent ERC-20, ERC-721, and ERC-1155 tokens. **Registry Update Summary**: - **Hedera Network**: ${{ github.event.inputs.HEDERA_NETWORK }} - **New ERC-20 Records Added**: ${{ env.NEW_ERC20_RECORDS }} - **New ERC-721 Records Added**: ${{ env.NEW_ERC721_RECORDS }} + - **New ERC-1155 Records Added**: ${{ env.NEW_ERC1155_RECORDS }} - **Indexing Duration**: ${{ env.INDEXING_DURATION }} - **Last Indexed Time**: ${{ env.CURRENT_DATE }} labels: 'internal'