tronprotocol / tronprotocol/tronbox

TRE Cheatcode Support for OpenZeppelin Hardhat-TRON

Open
#361 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
222
Forks
132
PR merge metrics
No merged PRs in 30d

Description

Background:
OpenZeppelin’s @openzeppelin/hardhat-tron plugin runs Hardhat tests against a local TRE node. Some Hardhat test helpers require development-only cheatcodes. Today, the missing methods are provided through a custom patched FullNode.jar that is built and mounted into TRE.

Could the required cheatcodes be supported directly in TRE/java-tron so the plugin can run against the standard tronbox/tre:dev image without rebuilding and maintaining a patched JAR?

Main methods to consider:

  • tre_snapshot, tre_revert, tre_dropSnapshot
  • tre_setNextBlockTimestamp
  • tre_impersonateAccount, tre_stopImpersonatingAccount
  • tre_mine behavior/refinements, if needed

Benefits: This would simplify Hardhat-TRON testing, avoid custom JAR rebuilds after TRE updates, and reduce maintenance between OpenZeppelin and TRON tooling.

These APIs should remain local-dev/regtest only, especially account impersonation.

References:
OpenZeppelin TRON Hardhat Plugin

CHEATCODES_SPEC.md

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CHEATCODES_SPEC.md and the OpenZeppelin TRON Hardhat Plugin reference, then inspect the TRE/java-tron code associated with the patched FullNode.jar. Compare the listed cheatcodes and their local-dev/regtest requirements with the current TRE behavior. Done means the plugin runs against the standard tronbox/tre:dev image without a custom JAR.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, javascript
Domain
blockchain, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.