Skip to content

Commit

Permalink
chore: added ERC-1155 to ERC Registry Indexer workflow (#1176)
Browse files Browse the repository at this point in the history
Signed-off-by: Logan Nguyen <[email protected]>
  • Loading branch information
quiet-node authored Jan 15, 2025
1 parent 82d2db2 commit 364c85f
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/erc-registry-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down

0 comments on commit 364c85f

Please sign in to comment.