Skip to content

Commit

Permalink
test: added acceptance test to validate the e2e flow of the ERC Regis…
Browse files Browse the repository at this point in the history
…try project (#1073)

* chore: moved unit tests into /unit folder

Signed-off-by: Logan Nguyen <[email protected]>

* fix: replace localnet with local-node

Signed-off-by: Logan Nguyen <[email protected]>

* dep: installed hashgraph sdk

Signed-off-by: Logan Nguyen <[email protected]>

* fix: refactor main runner off of index.ts

Signed-off-by: Logan Nguyen <[email protected]>

* fix: added example contract artifacts

Signed-off-by: Logan Nguyen <[email protected]>

* feat: added utilities helper functions

Signed-off-by: Logan Nguyen <[email protected]>

* test: added acceptance test to validate the e2e flow of the ERC Registry project

Signed-off-by: Logan Nguyen <[email protected]>

* chore: added test:unit and test:acceptance commands

Signed-off-by: Logan Nguyen <[email protected]>

* doc: added SDK_OPERATOR_ID and SDK_OPERATOR_KEY to readme.md

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
  • Loading branch information
quiet-node authored Dec 12, 2024
1 parent b29a7dc commit ddd373d
Show file tree
Hide file tree
Showing 23 changed files with 2,713 additions and 90 deletions.
14 changes: 8 additions & 6 deletions tools/erc-repository-indexer/erc-contract-indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ The ERC Contract Indexer is a tool designed to facilitate the indexing and manag

3. Create a `.env` file in the root directory and configure your environment variables:

| Variable | Description | Accepted Values |
| ---------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HEDERA_NETWORK` | The network to connect to. | `localnet`, `previewnet`, `testnet`, or `mainnet` |
| `MIRROR_NODE_URL` | The URL for the Hedera mirror node API. | A valid URL pointing to the Hedera mirror node (e.g., `https://{previewnet\|testnet\|mainnet}.mirrornode.hedera.com`) |
| `MIRROR_NODE_URL_WEB3` | The URL for the Hedera Mirror Node Web3Module API, required only when `HEDERA_NETWORK` is set to `localnet`. | Any value |
| `STARTING_POINT` | The starting point for contract indexing. | A Hedera contract ID (e.g., `0.0.369`), an EVM 20-byte address (e.g., `0x0000000000000000000000000000000000000369`), or a get contract list next pointer (e.g., `/api/v1/contracts?limit=100&order=asc&contract.id=gt:0.0.369`) |
| Variable | Description | Accepted Values |
| ---------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `HEDERA_NETWORK` | The network to connect to. | `local-node`, `previewnet`, `testnet`, or `mainnet` |
| `MIRROR_NODE_URL` | The URL for the Hedera mirror node API. | A valid URL pointing to the Hedera mirror node (e.g., `https://{previewnet\|testnet\|mainnet}.mirrornode.hedera.com`) |
| `MIRROR_NODE_URL_WEB3` | The URL for the Hedera Mirror Node Web3Module API, required only when `HEDERA_NETWORK` is set to `local-node`. | Any value |
| `STARTING_POINT` | The starting point for contract indexing. | A Hedera contract ID (e.g., `0.0.369`), an EVM 20-byte address (e.g., `0x0000000000000000000000000000000000000369`), or a get contract list next pointer (e.g., `/api/v1/contracts?limit=100&order=asc&contract.id=gt:0.0.369`) |
| `SDK_OPERATOR_ID` | The operator ID used to initialize a Hashgraph SDK, applicable only for testing. | Hedera Account IDs |
| `SDK_OPERATOR_KEY` | The operator Key used to initialize a Hashgraph SDK, applicable only for testing. | Hedera Account DER Private Key |

Example configuration:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
HEDERA_NETWORK=
MIRROR_NODE_URL=
STARTING_POINT=
MIRROR_NODE_URL_WEB3= # only necessary for local-node
SDK_OPERATOR_ID= # only necessary for acceptance test
SDK_OPERATOR_KEY= # only necessary for acceptance test
Loading

0 comments on commit ddd373d

Please sign in to comment.