Skip to content

Commit

Permalink
Merge branch 'main' into 1012-proxy-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinabl authored Jan 15, 2025
2 parents fc1b9a7 + 82d2db2 commit f370b7f
Show file tree
Hide file tree
Showing 45 changed files with 1,845 additions and 189 deletions.
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
# NOTE: Must be placed last to ensure enforcement over all other rules

# Protection Rules for Github Configuration Files and Actions Workflows
/.github/ @hashgraph/devops-ci @hashgraph/release-engineering-managers
/.github/CODEOWNERS @hashgraph/devops-ci @hashgraph/release-engineering-managers @Nana-EC
/.github/workflows/ @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-smart-contracts-product @hashgraph/hedera-smart-contracts
/.github/ @hashgraph/platform-ci @hashgraph/release-engineering-managers
/.github/CODEOWNERS @hashgraph/platform-ci @hashgraph/release-engineering-managers @Nana-EC
/.github/workflows/ @hashgraph/platform-ci @hashgraph/platform-ci-committers @hashgraph/release-engineering-managers

# Self-protection for root CODEOWNERS files (this file should not exist and should definitely require approval)
/CODEOWNERS @hashgraph/release-engineering-managers

# Protect the repository root files
/README.md @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-smart-contracts-product @hashgraph/hedera-smart-contracts
/README.md @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/hedera-smart-contracts-product @hashgraph/hedera-smart-contracts
**/LICENSE @hashgraph/release-engineering-managers

# Git Ignore definitions
**/.gitignore @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-smart-contracts-product @hashgraph/hedera-smart-contracts
**/.gitignore.* @hashgraph/devops-ci @hashgraph/release-engineering-managers @hashgraph/hedera-smart-contracts-product @hashgraph/hedera-smart-contracts
**/.gitignore @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/hedera-smart-contracts-product @hashgraph/hedera-smart-contracts
**/.gitignore.* @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/hedera-smart-contracts-product @hashgraph/hedera-smart-contracts
2 changes: 1 addition & 1 deletion .github/workflows/dapp-playground-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
52 changes: 49 additions & 3 deletions .github/workflows/erc-registry-indexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
STARTING_POINT:
description: 'Starting Point (e.g., a contractId, a contract address, ect.). Leave empty to start from the beginning or from last saved starting point.'
required: false
SCAN_CONTRACT_LIMIT:
description: 'The maximum number of contracts to scan per operation, with a default value of 100. Accepts only numeric values between 1 and 100.'
required: false

jobs:
index-and-update:
Expand All @@ -22,7 +25,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand All @@ -41,6 +44,7 @@ jobs:
echo "HEDERA_NETWORK=${{ github.event.inputs.HEDERA_NETWORK }}" >> ${{ env.INDEXER_PATH }}/.env
echo "MIRROR_NODE_URL=${{ github.event.inputs.MIRROR_NODE_URL }}" >> ${{ env.INDEXER_PATH }}/.env
echo "STARTING_POINT=${{ github.event.inputs.STARTING_POINT }}" >> ${{ env.INDEXER_PATH }}/.env
echo "SCAN_CONTRACT_LIMIT=${{ github.event.inputs.SCAN_CONTRACT_LIMIT }}" >> ${{ env.INDEXER_PATH }}/.env
- name: Install Dependencies
run: |
Expand Down Expand Up @@ -136,7 +140,7 @@ jobs:
id: current_date
run: echo "CURRENT_DATE=$(date -u +"%m-%d-%Y")" >> $GITHUB_ENV

- name: Create Pull Request
- name: Create Pull Request Target hedera-smart-contracts Repository
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
with:
branch: ERC-Registry-Periodical-Update/${{ github.run_id }}
Expand All @@ -157,6 +161,48 @@ jobs:
- **New ERC-20 Records Added**: ${{ env.NEW_ERC20_RECORDS }}
- **New ERC-721 Records Added**: ${{ env.NEW_ERC721_RECORDS }}
- **Indexing Duration**: ${{ env.INDEXING_DURATION }}
- **Current Date**: ${{ env.CURRENT_DATE }}
- **Last Indexed Time**: ${{ env.CURRENT_DATE }}
labels: 'internal'
assignees: 'swirlds-automation'

- name: Backup erc-registry to Temporary Directory
run: |
mkdir -p /tmp/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}
cp -r ${{ env.INDEXER_PATH }}/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/* /tmp/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}
- name: Checkout hedera-mirror-node-explorer
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
repository: hashgraph/hedera-mirror-node-explorer
token: ${{ secrets.GH_ACCESS_TOKEN_MIRROR_NODE_EXPLORER }}

- name: Restore erc-registry from Temporary Directory
run: |
mkdir -p ./erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}
cp -r /tmp/erc-registry/${{ github.event.inputs.HEDERA_NETWORK }}/* ./public/${{ github.event.inputs.HEDERA_NETWORK }}
- name: Create Pull Request Target hedera-mirror-node-explorer
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}}'
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}}'
body: >
**Description**:
This PR updates the ERC Registry to include the most recent ERC-20 and ERC-721 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 }}
- **Indexing Duration**: ${{ env.INDEXING_DURATION }}
- **Last Indexed Time**: ${{ env.CURRENT_DATE }}
labels: 'internal'
assignees: 'swirlds-automation'
57 changes: 57 additions & 0 deletions .github/workflows/erc-registry-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: ERC Registry Tool Test

on:
pull_request:
branches: [main, release/**]
push:
branches: [main, release/**]
tags: [v*]

jobs:
run-test:
name: ERC Registry Tool
runs-on: smart-contracts-linux-large
env:
INDEXER_PATH: ./tools/erc-repository-indexer/erc-contract-indexer
steps:
- name: Harden Runner
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive

- name: Use Node.js [20]
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20

- name: Create .env file
run: cp ${{env.INDEXER_PATH}}/local.env ${{env.INDEXER_PATH}}/.env

- name: Install Dependencies
run: |
npm ci
cd ${{env.INDEXER_PATH}}
npm install
- name: Run Unit Tests
run: |
cd ${{env.INDEXER_PATH}}
npm run test:unit
- name: Start the local node
run: npx hedera start -d --verbose=trace
timeout-minutes: 5

- name: Run Acceptance Tests
run: |
cd ${{env.INDEXER_PATH}}
npm run test:acceptance
- name: Stop the local node
if: ${{ !cancelled() }}
run: npx hedera stop
4 changes: 2 additions & 2 deletions .github/workflows/flow-pr-title-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:
title-check:
name: Title Check
runs-on: smart-contracts-linux-medium
if: ${{ !github.event.pull_request.base.repo.fork }}
if: ${{ !github.event.pull_request.head.repo.fork }}
permissions:
statuses: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/foundry_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: smart-contracts-linux-large
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/migration-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: smart-contracts-linux-large
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/opcode-logger-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: smart-contracts-linux-large
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-label-milestone-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
MILESTONE_NUMBER: ${{ steps.milestone.outputs.milestone_id }}

- name: Commit and Tag
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
with:
commit_author: ${{ steps.gpg_importer.outputs.name }} <${{ steps.gpg_importer.outputs.email }}>
commit_message: 'chore(release): Bump versions for ${{ env.RELEASE_TAG }}'
Expand All @@ -119,7 +119,7 @@ jobs:
tagging_message: ${{ env.RELEASE_TAG }}

- name: Create Github Release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
uses: ncipollo/release-action@cdcc88a9acf3ca41c16c37bb7d21b9ad48560d87 # v1.15.0
with:
bodyFile: ${{ env.RELEASE_NOTES_FILENAME }}.md
commit: ${{ env.RELEASE_BRANCH }}
Expand All @@ -142,7 +142,7 @@ jobs:
PR_TITLE: ${{ needs.branch_bump_tag.outputs.pr_title }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand All @@ -38,7 +38,7 @@ jobs:
run: tar -czf ${{ env.PACKAGE_NAME }}-v${{env.TAG}}.tgz -C ./hedera-smart-contracts .

- name: Upload artifact
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: ${{ env.PACKAGE_NAME }}-v${{env.TAG}}
path: ./*.tgz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/solidity-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
runs-on: smart-contracts-linux-large
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: Test Results (${{ inputs.testfilter }})
path: test-*.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
runs-on: smart-contracts-linux-large
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
uses: step-security/harden-runner@c95a14d0e5bab51a9f56296a4eb0e416910cd350 # v2.10.3
with:
egress-policy: audit

Expand Down
Loading

0 comments on commit f370b7f

Please sign in to comment.