Skip to content

Commit 68c469f

Browse files
authored
Revise documentation around tools (#993)
* update readme Signed-off-by: georgi-l95 <[email protected]> * revert change Signed-off-by: georgi-l95 <[email protected]> --------- Signed-off-by: georgi-l95 <[email protected]>
1 parent 06ab6e3 commit 68c469f

File tree

3 files changed

+28
-64
lines changed

3 files changed

+28
-64
lines changed

packages/server/tests/acceptance/index.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ describe('RPC Server Acceptance Tests', function () {
132132

133133
function runLocalHederaNetwork() {
134134
// set env variables for docker images until local-node is updated
135-
process.env['NETWORK_NODE_IMAGE_TAG'] = '0.35.0-alpha.6';
136-
process.env['HAVEGED_IMAGE_TAG'] = '0.35.0-alpha.6';
137-
process.env['MIRROR_IMAGE_TAG'] = '0.75.0-rc3';
135+
process.env['NETWORK_NODE_IMAGE_TAG'] = '0.36.0-alpha.1';
136+
process.env['HAVEGED_IMAGE_TAG'] = '0.36.0-alpha.1';
137+
process.env['MIRROR_IMAGE_TAG'] = '0.76.1';
138138

139139
console.log(`Docker container versions, services: ${process.env['NETWORK_NODE_IMAGE_TAG']}, mirror: ${process.env['MIRROR_IMAGE_TAG']}`);
140140

packages/server/tests/helpers/prerequisite.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const RELAY_URL = process.env.E2E_RELAY_HOST || LOCAL_RELAY_URL;
1111

1212
(function () {
1313
if (USE_LOCAL_NODE) {
14-
process.env['NETWORK_NODE_IMAGE_TAG'] = '0.35.0-alpha.6';
15-
process.env['HAVEGED_IMAGE_TAG'] = '0.35.0-alpha.6';
16-
process.env['MIRROR_IMAGE_TAG'] = '0.75.0-rc3';
14+
process.env['NETWORK_NODE_IMAGE_TAG'] = '0.36.0-alpha.1';
15+
process.env['HAVEGED_IMAGE_TAG'] = '0.36.0-alpha.1';
16+
process.env['MIRROR_IMAGE_TAG'] = '0.76.1';
1717

1818
console.log(`Docker container versions, services: ${process.env['NETWORK_NODE_IMAGE_TAG']}, mirror: ${process.env['MIRROR_IMAGE_TAG']}`);
1919

tools/README.md

Lines changed: 22 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,34 @@
22

33
### TheGraph integration
44

5-
| | Status | Description |
6-
| ----------- | ----------- | ----------- |
7-
| Catch & handle events emitted from EthereumTransactions ||
8-
| Catch & handle events emitted from ContractCall & ContractCreate ||
9-
| Capture ERC transfers through HTS precompile ||
10-
| Execute contract calls during subgraph event processing ||
11-
| Being able to specify the startBlock from which the graph sync ||
12-
| Support for multiple dataSources ||
13-
| Support for dynamic dataSource templates ||
14-
| Block Handlers WITHOUT filters ||
15-
| Can index anonymous events ||
16-
| Block Handlers WITH filters | ❌ | Requires Parity's [trace_filter](https://openethereum.github.io/JSONRPC-trace-module#trace_filter)
17-
| Call Handlers | ❌ | Requires Parity's [trace_filter](https://openethereum.github.io/JSONRPC-trace-module#trace_filter)
18-
| Capture HTS transfers through HTS precompile | ❌ | Depends on [4127](https://github.com/hashgraph/hedera-services/issues/4127)
19-
| Capture HTS token transfers through HAPI | ❌ | Depends on [4337](https://github.com/hashgraph/hedera-mirror-node/issues/4337), [4738](https://github.com/hashgraph/hedera-mirror-node/issues/4738)
5+
| | Status | Description |
6+
| ---------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
7+
| Catch & handle events emitted from EthereumTransactions | |
8+
| Catch & handle events emitted from ContractCall & ContractCreate | |
9+
| Capture ERC transfers through HTS precompile | |
10+
| Execute contract calls during subgraph event processing | |
11+
| Being able to specify the startBlock from which the graph sync | |
12+
| Support for multiple dataSources | |
13+
| Support for dynamic dataSource templates | |
14+
| Block Handlers WITHOUT filters | |
15+
| Can index anonymous events | |
16+
| Block Handlers WITH filters | | Requires Parity's [trace_filter](https://openethereum.github.io/JSONRPC-trace-module#trace_filter) |
17+
| Call Handlers | | Requires Parity's [trace_filter](https://openethereum.github.io/JSONRPC-trace-module#trace_filter) |
18+
| Capture HTS transfers through HTS precompile | | Depends on [4127](https://github.com/hashgraph/hedera-services/issues/4127) |
19+
| Capture HTS token transfers through HAPI | | Depends on [4337](https://github.com/hashgraph/hedera-mirror-node/issues/4337), [4738](https://github.com/hashgraph/hedera-mirror-node/issues/4738) |
2020

2121
### Supported tools
22-
| | web3js | Truffle | ethers | Hardhat |
23-
|----------------------------------------------------------------------|--------|---------|--------|---------|
24-
| Transfer HBARS |||||
25-
| Contract Deployment |||||
26-
| Can use the contract instance after deploy without re-initialization ||| ⚠️ | ⚠️ |
27-
| Contract View Function Call |||||
28-
| Contract Function Call |||||
2922

30-
Note:
31-
On contract deployment, most of the tools (e.g. [ethersjs](https://docs.ethers.io/v5/api/utils/address/#utils--contract-addresses)) pre-compute the contract address on the client-side, based
32-
on sender address and nonce. In the Hedera ecosystem, it's not like that, where it's just the next available id.
33-
[ethersjs](https://docs.ethers.io/v5/) and therefore Hardhat usage are impacted by this address calculation difference with the details captured [here](https://github.com/ethers-io/ethers.js/discussions/3141).
34-
An extra step to retrieve the valid Hedera contract address is required to workaround this challenge, example workarounds are provided below.
23+
| | web3js | Truffle | ethers | Hardhat |
24+
| -------------------------------------------------------------------- | ------ | ------- | ------ | ------- |
25+
| Transfer HBARS |||||
26+
| Contract Deployment |||||
27+
| Can use the contract instance after deploy without re-initialization |||||
28+
| Contract View Function Call |||||
29+
| Contract Function Call |||||
3530

3631
Note:
3732
Development tools are usually making a lot of requests to certain endpoints, especially during contract deployment. Be aware about rate limiting, when deploying multiple large contracts.
3833

3934
Note:
4035
Enable [`development mode`](../docs/dev-mode.md) to correctly assert revert messages of contract calls with `hardhat-chai-matchers`.
41-
42-
#### Option 1
43-
```typescript
44-
// init the contract factory
45-
const factory = new ethers.ContractFactory(contractJson.abi, contractJson.bytecode, wallet);
46-
// deploy the contract
47-
let contract = await factory.deploy();
48-
49-
// wait till the transaction has reached consensus and get the contract address from the receipt
50-
const { contractAddress } = await contract.deployTransaction.wait();
51-
52-
// re-init the contract with the deployed address
53-
contract = new ethers.Contract(contractAddress, contractJson.abi, wallet);
54-
```
55-
56-
#### Option 2
57-
```typescript
58-
// init the contract factory
59-
const factory = new ethers.ContractFactory(contractJson.abi, contractJson.bytecode, wallet);
60-
// deploy the contract
61-
let contract = await factory.deploy();
62-
63-
// wait for transaction to reach consensus
64-
await contract.deployed();
65-
66-
// get the transaction receipt
67-
const receipt = await provider.getTransactionReceipt(contract.deployTransaction.hash);
68-
69-
// re-init the contract with the deployed address
70-
contract = new ethers.Contract(receipt.contractAddress, contractJson.abi, wallet);
71-
```

0 commit comments

Comments
 (0)