-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Developer mode #668
Developer mode #668
Conversation
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Codecov ReportBase: 70.60% // Head: 70.75% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #668 +/- ##
==========================================
+ Coverage 70.60% 70.75% +0.15%
==========================================
Files 16 16
Lines 1167 1173 +6
Branches 205 207 +2
==========================================
+ Hits 824 830 +6
Misses 286 286
Partials 57 57
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are great,
Just need to fill in the documentation holes so it's easier understood. Especially since you have a vision for dev mode
This is my suggestion to make sure everyone understands and it's exposed to users.
- Add a docs/dev-mode.md file as part of your PR
a. It should have an initial summary with your vision for dev mode.
b. It should have a sub section that has the above summary focused on ethersjs revert error work around. - Add a link under the main README where you set the
DEV_MODE = false
that points to thedev-mode.md
for more details - Update the https://github.com/hashgraph/hedera-json-rpc-relay/tree/main/tools#supported-tools section with a note that points to the dev mode feature for ethersjs support
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
Description:
Adds a
developer mode
to the relay. Currently it only changes the behaviour ofeth_getTransactionByHash
, but in the future it can be used for enabling special settings in the local node, which will make it run faster.The following code is a standard way to assert for the revert message of a contract call when using
hardhat
with its internal evm or any Ethereum JsonRpcRelay:But the same code does not work when it is configured to use the relay. The difference is in
eth_estimateGas
- normally it throws a JsonRpc error, but in Hedera's context that is not an option.Developer mode
changes the behaviour ofeth_getTransactionByHash
to throw that same error after it has retrieved theerror_message
from the Mirror node.Related issue(s):
Fixes #
Notes for reviewer:
Checklist