Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hiero-ledger/hiero-sdk-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.45.0
Choose a base ref
...
head repository: hiero-ledger/hiero-sdk-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.46.0
Choose a head ref
  • 12 commits
  • 71 files changed
  • 5 contributors

Commits on May 21, 2024

  1. ci: updated for best practices (#2260)

    * updated for best practices
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * Updated trigger in renovate for workflow dispatch
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * updated renovate to include self-hosted linux runner
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * Removed commented out self-hosted runners where they should be removed
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * Added hardened runner step
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * updated codeowners
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * Updated to use appropriate teams for code ownership
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * Updated CODEOWNERS to include hashgraph/hedera-sdk-js-maintainers
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    * Updated the CODEOWNERS line
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    
    ---------
    
    Signed-off-by: Roger Barker <roger.barker@swirldslabs.com>
    rbarker-dev authored May 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ae33e64 View commit details

Commits on May 22, 2024

  1. --- (#2295)

    updated-dependencies:
    - dependency-name: step-security/harden-runner
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9e952db View commit details

Commits on May 23, 2024

  1. fix: typo (#2293)

    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored May 23, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b3a1814 View commit details

Commits on Jun 3, 2024

  1. fix: enhanced Logger to accept a log file location (#2298)

    * added log to file capability
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * updated test case and the way the grpc error is created
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * include the original grpc error message in the new error
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * bumped timeout because of pipeline failure
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * Update src/grpc/GrpcServiceError.js
    
    Co-authored-by: Alexander Gadzhalov <alexander.gadzhalov@limechain.tech>
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * updates based on PR review feedback
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * don't error if the tmp dir log file does not exist
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * use cgroups to prevent github runner from losing communication with server
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    * fix syntax error
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    
    ---------
    
    Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
    Co-authored-by: Alexander Gadzhalov <alexander.gadzhalov@limechain.tech>
    jeromy-cannon and agadzhalov authored Jun 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    aa5411c View commit details
  2. Bump actions/deploy-pages from 4.0.4 to 4.0.5 (#2212)

    Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 4.0.4 to 4.0.5.
    - [Release notes](https://github.com/actions/deploy-pages/releases)
    - [Commits](actions/deploy-pages@decdde0...d6db901)
    
    ---
    updated-dependencies:
    - dependency-name: actions/deploy-pages
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    4b441d2 View commit details
  3. Bump actions/setup-java from 3.13.0 to 4.2.1 (#2202)

    Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.13.0 to 4.2.1.
    - [Release notes](https://github.com/actions/setup-java/releases)
    - [Commits](actions/setup-java@0ab4596...99b8673)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-java
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b9b349b View commit details
  4. chore(deps): bump renovatebot/github-action from 40.1.0 to 40.1.12 (#…

    …2323)
    
    Bumps [renovatebot/github-action](https://github.com/renovatebot/github-action) from 40.1.0 to 40.1.12.
    - [Release notes](https://github.com/renovatebot/github-action/releases)
    - [Changelog](https://github.com/renovatebot/github-action/blob/main/CHANGELOG.md)
    - [Commits](renovatebot/github-action@2d90417...21d88b0)
    
    ---
    updated-dependencies:
    - dependency-name: renovatebot/github-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5254068 View commit details
  5. chore(deps): bump pnpm/action-setup from 3.0.0 to 4.0.0 (#2286)

    Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 3.0.0 to 4.0.0.
    - [Release notes](https://github.com/pnpm/action-setup/releases)
    - [Commits](pnpm/action-setup@a3252b7...fe02b34)
    
    ---
    updated-dependencies:
    - dependency-name: pnpm/action-setup
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 3, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    269fb78 View commit details

Commits on Jun 6, 2024

  1. fix: naming convention (#2303)

    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored Jun 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    14489c9 View commit details
  2. feat: solution to query the mirror node for the account balance, acco…

    …unt info, and contract info data (#2289)
    
    * update: queries
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: queries
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: adjustments and formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: increase timeout
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * remove logs
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: reorder tests in the suite
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: reliability issue
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: reliability issue
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: integration test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: reorder steps in the pipeline
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: update build workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: reorder steps in build workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: adjustment
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: unit test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: unit test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: unit tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: revert workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * add logs
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * ..
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * add: tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * deprecate symbol
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: review changes
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: added missing statuses
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: renaming
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: naming
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: typo
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: add new response code
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: build workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    ---------
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored Jun 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    70214b1 View commit details
  3. release: stable version v2.46.0 (#2325)

    * update: new proto stable version v2.15.0
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: new stable version v2.46.0
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: new proto version in sdk
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: changelog
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    ---------
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored Jun 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6947b36 View commit details
  4. update: workflow (#2326)

    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored Jun 6, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1963a89 View commit details
Showing with 2,182 additions and 990 deletions.
  1. +29 −1 .github/CODEOWNERS
  2. +74 −20 .github/workflows/build.yml
  3. +6 −1 .github/workflows/common_js.yml
  4. +7 −2 .github/workflows/pages.yml
  5. +25 −10 .github/workflows/publish_release.yaml
  6. +18 −4 .github/workflows/react_native.yml
  7. +8 −2 .github/workflows/renovate.yml
  8. +9 −0 CHANGELOG.md
  9. +1 −1 Taskfile.yml
  10. +2 −2 examples/update-nfts-metadata-of-non-fungible-token.js
  11. +4 −3 package.json
  12. +2 −2 packages/proto/package.json
  13. +25 −2 src/Executable.js
  14. +54 −0 src/Status.js
  15. +0 −10 src/account/AccountBalance.js
  16. +69 −6 src/account/AccountBalanceQuery.js
  17. +74 −10 src/account/AccountInfoQuery.js
  18. +18 −3 src/account/TokenRelationship.js
  19. +0 −2 src/client/ManagedNetwork.js
  20. +4 −0 src/client/NodeClient.js
  21. +67 −10 src/contract/ContractInfoQuery.js
  22. +3 −1 src/exports.js
  23. +14 −2 src/grpc/GrpcServiceError.js
  24. +52 −11 src/logger/Logger.js
  25. +115 −0 src/network/MirrorNodeGateway.js
  26. +87 −0 src/network/MirrorNodeRouter.js
  27. +205 −0 src/network/MirrorNodeService.js
  28. +4 −4 src/network/NetworkVersionInfo.js
  29. +3 −2 src/token/TokenNftsUpdateTransaction.js
  30. +234 −0 src/token/TokenUpdateNftsTransaction.js
  31. +34 −33 test/integration/AccountBalanceIntegrationTest.js
  32. +9 −0 test/integration/AccountCreateIntegrationTest.js
  33. +1 −0 test/integration/AccountDeleteIntegrationTest.js
  34. +30 −33 test/integration/AccountInfoIntegrationTest.js
  35. +1 −0 test/integration/AccountUpdateIntegrationTest.js
  36. +65 −61 test/integration/ClientIntegrationTest.js
  37. +1 −0 test/integration/ContractCreateIntegrationTest.js
  38. +2 −0 test/integration/ContractDeleteIntegrationTest.js
  39. +3 −18 test/integration/ContractFunctionParametersIntegrationTest.js
  40. +3 −0 test/integration/ContractInfoIntegrationTest.js
  41. +2 −0 test/integration/ContractUpdateIntegrationTest.js
  42. +0 −1 test/integration/CustomFeesIntegrationTest.js
  43. +5 −0 test/integration/GetCostIntegrationTest.js
  44. +1 −3 test/integration/ScheduleCreateIntegrationTest.js
  45. +5 −26 test/integration/TokenAllowancesIntegrationTest.js
  46. +69 −70 test/integration/TokenAssociateIntegrationTest.js
  47. +48 −52 test/integration/TokenBurnIntegrationTest.js
  48. +89 −90 test/integration/TokenDissociateIntegrationTest.js
  49. +67 −71 test/integration/TokenFreezeIntegrationTest.js
  50. +67 −71 test/integration/TokenGrantKycIntegrationTest.js
  51. +8 −8 test/integration/TokenNftsUpdateTransactionIntegrationTest.js
  52. +91 −94 test/integration/TokenRevokeKycIntegrationTest.js
  53. +2 −0 test/integration/TokenTransferIntegrationTest.js
  54. +91 −94 test/integration/TokenUnfreezeIntegrationTest.js
  55. +95 −98 test/integration/TokenWipeIntegrationTest.js
  56. +23 −22 test/integration/TopicMessageIntegrationTest.js
  57. +12 −7 test/integration/TopicMessageQueryTest.js
  58. +1 −6 test/integration/TransactionRecordIntegrationTest.js
  59. +1 −3 test/integration/client/BaseIntegrationTestEnv.js
  60. +10 −3 test/unit/AccountInfoMocking.js
  61. +7 −2 test/unit/ContractCreateFlowMocking.js
  62. +7 −2 test/unit/EthereumFlowMocking.js
  63. +1 −1 test/unit/FileAppendMocking.js
  64. +58 −0 test/unit/LoggerTest.js
  65. +43 −0 test/unit/MirrorNodeService.js
  66. +3 −1 test/unit/Mocker.js
  67. +7 −2 test/unit/TopicMessageMocking.js
  68. +0 −1 test/unit/TransactionReceipt.js
  69. +7 −2 test/unit/TransactionReceiptMocking.js
  70. +0 −2 test/unit/TransactionRecord.js
  71. +0 −2 test/unit/TransactionResponse.js
30 changes: 29 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# Default code owners for entire repository
* @SimiHunjan @ochikov @petreze @svetoslav-nikol0v @agadzhalov
* @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers

#########################
##### Core Files ######
#########################

# NOTE: Must be placed last to ensure enforcement over all other rules

# Protection Rules for Github Configuration Files and Actions Workflows
/.github/ @hashgraph/release-engineering @hashgraph/release-engineering-managers
/.github/workflows/ @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers

# Codacy Tool Configurations
/config/ @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers
.remarkrc @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers

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

# Protect the repository root files
/README.md @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers
**/LICENSE @hashgraph/release-engineering @hashgraph/release-engineering-managers

# CodeCov configuration
**/codecov.yml @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers

# Git Ignore definitions
**/.gitignore @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers
**/.gitignore.* @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/hedera-sdk @hashgraph/hedera-sdk-js-maintainers
94 changes: 74 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -19,6 +19,9 @@ defaults:
permissions:
contents: read

env:
CG_EXEC: export R_UID=$(id -u); CGROUP_LOGLEVEL=DEBUG cgexec -g cpu,memory:user.slice/user-${R_UID}.slice/user@${R_UID}.service/e2e-${{ github.run_id }} --sticky ionice -c 2 -n 2 nice -n 19

jobs:
build:
name: Build using Node ${{ matrix.node }}
@@ -28,6 +31,11 @@ jobs:
node: [ "16", "18" ]

steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
@@ -39,7 +47,7 @@ jobs:
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 8.15.4

@@ -60,6 +68,52 @@ jobs:
node: [ "16" ]

steps:
- name: Setup Control Groups
run: |
echo "::group::Get System Configuration"
USR_ID="$(id -un)"
GRP_ID="$(id -gn)"
E2E_MEM_LIMIT="30064771072"
AGENT_MEM_LIMIT="2147483648"
USER_SLICE="user.slice/user-$(id -u).slice"
USER_SERVICE="${USER_SLICE}/user@$(id -u).service"
E2E_GROUP_NAME="${USER_SERVICE}/e2e-${{ github.run_id }}"
AGENT_GROUP_NAME="${USER_SERVICE}/agent-${{ github.run_id }}"
echo "::endgroup::"
echo "::group::Install Control Group Tools"
if ! command -v cgcreate >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y cgroup-tools
fi
echo "::endgroup::"
echo "::group::Create Control Groups"
sudo cgcreate -g cpu,memory:${USER_SLICE} -a ${USR_ID}:${GRP_ID} -t ${USR_ID}:${GRP_ID}
sudo cgcreate -g cpu,memory:${USER_SERVICE} -a ${USR_ID}:${GRP_ID} -t ${USR_ID}:${GRP_ID}
sudo cgcreate -g cpu,memory:${E2E_GROUP_NAME} -a ${USR_ID}:${GRP_ID} -t ${USR_ID}:${GRP_ID}
sudo cgcreate -g cpu,memory:${AGENT_GROUP_NAME} -a ${USR_ID}:${GRP_ID} -t ${USR_ID}:${GRP_ID}
echo "::endgroup::"
echo "::group::Set Control Group Limits"
cgset -r cpu.weight=768 ${E2E_GROUP_NAME}
cgset -r cpu.weight=500 ${AGENT_GROUP_NAME}
cgset -r memory.max=${E2E_MEM_LIMIT} ${E2E_GROUP_NAME}
cgset -r memory.max=${AGENT_MEM_LIMIT} ${AGENT_GROUP_NAME}
cgset -r memory.swap.max=${E2E_MEM_LIMIT} ${E2E_GROUP_NAME}
cgset -r memory.swap.max=${AGENT_MEM_LIMIT} ${AGENT_GROUP_NAME}
echo "::endgroup::"
echo "::group::Move Runner Processes to Control Groups"
sudo cgclassify --sticky -g cpu,memory:${AGENT_GROUP_NAME} $(pgrep 'Runner.Listener' | tr '\n' ' ')
sudo cgclassify -g cpu,memory:${AGENT_GROUP_NAME} $(pgrep 'Runner.Worker' | tr '\n' ' ')
echo "::endgroup::"
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
@@ -79,7 +133,7 @@ jobs:
cat .env
- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 8.15.4

@@ -102,38 +156,38 @@ jobs:
id: start-local-node
if: ${{ steps.build-sdk.conclusion == 'success' && !cancelled() && always() }}
run: |
npx @hashgraph/hedera-local start -d --network-tag=0.49.7 --balance=100000
${{ env.CG_EXEC }} npx @hashgraph/hedera-local start -d --network-tag=0.49.7 --balance=100000
# Wait for the network to fully start
sleep 30
sleep 30
- name: Run Hedera SDK Integration Tests Codecov
if: ${{ steps.build-sdk.conclusion == 'success' && steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: task test:integration:codecov

- name: Stop the local node
id: stop-local-node
if: ${{ steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: npx @hashgraph/hedera-local stop
run: ${{ env.CG_EXEC }} task test:integration:codecov

- name: Build @hashgraph/cryptography
working-directory: packages/cryptography
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && !cancelled() && always() }}
run: task build
if: ${{ steps.build-sdk.conclusion == 'success' && steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task build

- name: Unit Test @hashgraph/cryptography
working-directory: packages/cryptography
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && !cancelled() && always() }}
run: task test:unit
if: ${{ steps.build-sdk.conclusion == 'success' && steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit

- name: Codecov @hashgraph/cryptography
working-directory: packages/cryptography
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && !cancelled() && always() }}
run: task test:unit:codecov
if: ${{ steps.build-sdk.conclusion == 'success' && steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit:codecov

- name: Unit Test @hashgraph/sdk
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && steps.playwright-deps.conclusion == 'success' && !cancelled() && always() }}
run: task test:unit
if: ${{ steps.build-sdk.conclusion == 'success' && steps.start-local-node.conclusion == 'success' && steps.playwright-deps.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit

- name: Codecov @hashgraph/sdk
if: ${{ steps.build-sdk.conclusion == 'success' && steps.stop-local-node.conclusion == 'success' && !cancelled() && always() }}
run: task test:unit:codecov
if: ${{ steps.build-sdk.conclusion == 'success' && steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} task test:unit:codecov

- name: Stop the local node
id: stop-local-node
if: ${{ steps.start-local-node.conclusion == 'success' && !cancelled() && always() }}
run: ${{ env.CG_EXEC }} npx @hashgraph/hedera-local stop
7 changes: 6 additions & 1 deletion .github/workflows/common_js.yml
Original file line number Diff line number Diff line change
@@ -27,6 +27,11 @@ jobs:
node: [ "16", "18" ]

steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
@@ -38,7 +43,7 @@ jobs:
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 8.15.4

9 changes: 7 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -17,6 +17,11 @@ jobs:
name: Documentation
runs-on: [self-hosted, Linux, medium, ephemeral]
steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
@@ -33,7 +38,7 @@ jobs:
node-version: 18

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 8.15.4

@@ -50,6 +55,6 @@ jobs:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@decdde0ac072f6dcbe43649d82d9c635fff5b4e4 # v4.0.4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
35 changes: 25 additions & 10 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
@@ -32,6 +32,11 @@ jobs:
prerelease: ${{ steps.tag.outputs.prerelease }}
type: ${{ steps.tag.outputs.type }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
@@ -64,19 +69,19 @@ jobs:
run: |
REF_NAME="$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))"
IS_VALID_SEMVER="$(semver validate "${REF_NAME}")"
if [[ "${IS_VALID_SEMVER}" != "valid" ]]; then
echo "::error title=Invalid Tag::The tag '${REF_NAME}' is not a valid SemVer tag."
exit 1
fi
RELEASE_VERSION="$(semver get release "${REF_NAME}")"
PREREL_VERSION="$(semver get prerel "${REF_NAME}")"
PREREL_VERSION_LC="$(printf "%s" "${PREREL_VERSION}" | tr '[:upper:]' '[:lower:]')"
IS_PRERELEASE="false"
[[ -n "${PREREL_VERSION}" ]] && IS_PRERELEASE="true"
PREREL_TYPE="unknown"
if [[ "${IS_PRERELEASE}" == "true" ]]; then
if [[ "${PREREL_VERSION_LC}" =~ "beta" ]]; then
@@ -87,12 +92,12 @@ jobs:
else
PREREL_TYPE="production"
fi
FINAL_VERSION="${RELEASE_VERSION}"
[[ -n "${PREREL_VERSION}" ]] && FINAL_VERSION="${RELEASE_VERSION}-${PREREL_VERSION}"
TAG_NAME="v${FINAL_VERSION}"
echo "name=${TAG_NAME}" >>"${GITHUB_OUTPUT}"
echo "version=${FINAL_VERSION}" >>"${GITHUB_OUTPUT}"
echo "prerelease=${IS_PRERELEASE}" >>"${GITHUB_OUTPUT}"
@@ -105,7 +110,7 @@ jobs:
echo "::error title=Version Mismatch::The version in package.json (${{ steps.npm-package.outputs.version }}) does not match the version in the tag (${{ steps.tag.outputs.version }})."
exit 1
fi
if [[ "${{ steps.tag.outputs.type }}" != "production" && "${{ steps.tag.outputs.type }}" != "beta" ]]; then
echo "::error title=Unsupported PreRelease::The tag '${{ steps.tag.outputs.name }}' is an unsupported prerelease tag. Only 'beta' prereleases are supported."
exit 2
@@ -120,6 +125,11 @@ jobs:
name: Safety Checks
runs-on: [self-hosted, Linux, medium, ephemeral]
steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
@@ -131,7 +141,7 @@ jobs:
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 8.15.4

@@ -150,6 +160,11 @@ jobs:
- validate-release
- run-safety-checks
steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit

- name: Checkout Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
@@ -161,7 +176,7 @@ jobs:
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 8.15.4

@@ -209,7 +224,7 @@ jobs:
PUBLISH_ARGS="--access public --no-git-checks"
[[ "${{ github.event.inputs.dry-run-enabled }}" == "true" ]] && PUBLISH_ARGS="${PUBLISH_ARGS} --dry-run"
[[ "${{ needs.validate-release.outputs.prerelease }}" == "true" ]] && PUBLISH_ARGS="${PUBLISH_ARGS} --tag ${{ needs.validate-release.outputs.type }}"
echo "args=${PUBLISH_ARGS}" >>"${GITHUB_OUTPUT}"
# Add the registry authentication stanza with variable substitution to the .npmrc configuration file.
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >>".npmrc"
Loading